-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit sets up a Node.js project with Yarn as the package manager: ```shell yarn init -2 ```
- Loading branch information
0 parents
commit e30e351
Showing
16 changed files
with
1,115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Normalise some basic formatting settings across IDEs. | ||
# | ||
# Read more: | ||
# https://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = tab | ||
insert_final_newline = true | ||
|
||
# YAML does not support tabs for indentation. | ||
[*.{yaml,yml}] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Normalise line endings in the repository and in the working directory. | ||
# | ||
# Read more: | ||
# https://git-scm.com/docs/gitattributes | ||
# https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings | ||
|
||
* text=auto eol=lf | ||
|
||
|
||
# Exclude certain files from the language statistics in GitHub. | ||
# | ||
# Read more: | ||
# https://github.com/github/linguist | ||
|
||
/.yarn/** linguist-vendored | ||
/.yarn/releases/* binary | ||
/.yarn/plugins/**/* binary | ||
/.pnp.* binary linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Exclude certain files and directories from version control. | ||
# | ||
# Read more: | ||
# https://git-scm.com/docs/gitignore | ||
# https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
||
# IntelliJ IDEA. | ||
.idea/* | ||
!.idea/runConfigurations/ | ||
!.idea/*.iml | ||
!.idea/externalDependencies.xml | ||
!.idea/modules.xml | ||
!.idea/vcs.xml | ||
|
||
# Visual Studio Code. | ||
.vscode/* | ||
!.vscode/extensions.json | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
|
||
# AsciiDoctor. | ||
.asciidoctor/ | ||
.asciidoctorconfig | ||
|
||
# Local environment. | ||
*.local | ||
*.local.* | ||
|
||
# Dependency management. | ||
.yarn/* | ||
!.yarn/cache/ | ||
!.yarn/patches/ | ||
!.yarn/plugins/ | ||
!.yarn/releases/ | ||
!.yarn/sdks/ | ||
!.yarn/versions/ | ||
node_modules/ | ||
|
||
# Operating system artifacts. | ||
*~ | ||
.DS_Store | ||
Thumbs.db |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"asciidoctor.asciidoctor-vscode" | ||
], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/yarn.lock": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"tasks": [] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yarnPath: .yarn/releases/yarn-3.5.0.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
= Contribution Guidelines | ||
:experimental: | ||
:source-highlighter: highlight.js | ||
:toc: preamble | ||
|
||
Thank you for investing your time in contributing to our project! | ||
If you are a first-time contributor to this project, please take a look at the <<get_started>> section 😀 | ||
|
||
CAUTION: All commands in this README document are to be executed from the project root directory (where this document resides). | ||
|
||
[[get_started]] | ||
== Get Started | ||
This project uses the https://yarnpkg.com/features/zero-installs[zero-install feature] of the Yarn package manager. | ||
Upon cloning the Git repository, the `.yarn/cache` directory already contains a cache of the third-party dependencies, effectively replacing the usual `node_modules` directory. | ||
|
||
=== Install Node.js and Yarn | ||
* *macOS* and *Linux* users should install https://nodejs.org/en[Node.js] via https://github.com/nvm-sh/nvm[Node Version Manager] and opt for https://yarnpkg.com/getting-started/install[Yarn] via https://nodejs.org/api/corepack.html[Corepack]: | ||
+ | ||
[source,shell] | ||
---- | ||
$ curl https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash | ||
$ source ~/.bashrc | ||
$ nvm install --lts | ||
$ corepack enable yarn | ||
---- | ||
|
||
* *Windows* users should install https://nodejs.org/en[Node.js] via https://github.com/microsoft/winget-cli[Windows Package Manager] and install https://yarnpkg.com/getting-started/install[Yarn] via npm (which is actually a workaround until Corepack supports Windows): | ||
+ | ||
[source,shell] | ||
---- | ||
$ winget install OpenJS.NodeJS.LTS | ||
$ npm install --global yarn | ||
---- | ||
|
||
=== Prepare Git | ||
. Generate an SSH key with the *Ed25519* algorithm, for example using https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent[ssh-keygen] or https://developer.1password.com/docs/ssh/manage-keys[1Password], and add it to the SSH agent on your computer. | ||
If you already have an SSH key on your computer, you may skip this step. | ||
+ | ||
[source,shell,subs="+quotes,+replacements"] | ||
---- | ||
$ ssh-keygen -t ed25519 -f "$HOME/.ssh/**_<my-ssh-key>_**" | ||
$ ssh-add ~/.ssh/<my-ssh-key> | ||
---- | ||
|
||
* *Windows* users must instruct Git to use https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview[Microsoft OpenSSH] as the SSH agent: | ||
+ | ||
[source,shell] | ||
---- | ||
$ git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe" | ||
---- | ||
|
||
. Grab the **_public_** key. | ||
It appears like `ssh-ed25519 AAAAC3(...)`. | ||
+ | ||
[source,shell,subs="+quotes,+replacements"] | ||
---- | ||
$ cat ~/.ssh/**_<my-ssh-key>_**.pub | ||
---- | ||
|
||
. Register the public key in https://github.com/settings/keys[GitHub] as a signing key. | ||
|
||
. Obtain your noreply email address on https://github.com/settings/emails[GitHub]. | ||
It appears like `**_<id+username>_**@users.noreply.github.com`. | ||
|
||
. Declare your identity within the scope of this repository and use the public key to sign your commits: | ||
+ | ||
[source,shell,subs="+quotes,+replacements"] | ||
---- | ||
$ git config user.name "**_<FirstName> <LastName>_**" | ||
$ git config user.email "**_<id+username>_**@users.noreply.github.com" | ||
$ git config user.signingkey "ssh-ed25519 AAAAC3**_<PublicKey>_**" | ||
$ git config gpg.format "ssh" | ||
$ git config commit.gpgsign "true" | ||
$ git config tag.gpgsign "true" | ||
---- | ||
|
||
=== Prepare Your IDE | ||
* *IntelliJ IDEA* (and *WebStorm*) users should open the project directory: | ||
+ | ||
[source,shell] | ||
---- | ||
$ idea . | ||
---- | ||
|
||
. Install these plugins (follow the popup message, or go to menu:File[Settings > Plugins]): | ||
** https://plugins.jetbrains.com/plugin/7391-asciidoc[AsciiDoc] | ||
|
||
. Go to menu:File[Settings > Languages & Frameworks > Node.js]. | ||
Select the appropriate Node.js interpreter and enable coding assistance. | ||
|
||
* *Visual Studio Code* users should open the project directory: | ||
+ | ||
[source,shell] | ||
---- | ||
$ code . | ||
---- | ||
|
||
. Install these extensions (kbd:[Ctrl+Shift+X] and search for `@recommended`): | ||
+ | ||
** https://marketplace.visualstudio.com/items?itemName=asciidoctor.asciidoctor-vscode[AsciiDoc] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
= Deploy with Rsync over SSH | ||
:experimental: | ||
:source-highlighter: highlight.js | ||
:toc: preamble | ||
|
||
This repository implements an Ubuntu-based composite GitHub Action that copies files from the GitHub Actions runner to a remote host using the https://manpages.ubuntu.com/manpages/bionic/man1/rsync.1.html[Rsync] tool over SSH. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"packageManager": "yarn@3.5.0", | ||
"private": true | ||
} |
Empty file.