From 2793950090c9847eee98137f05c2db41de22a1f5 Mon Sep 17 00:00:00 2001 From: oganexon Date: Thu, 4 Feb 2021 15:29:11 +0100 Subject: [PATCH 1/8] docs: :construction: WIP --- docs/cli/README.md | 50 +++++++++++++++++++-- docs/cli/commands/README.md | 87 ++++++++++++++++++++++++++++++++++++ docs/cli/commands/publish.md | 81 +++++++++++++++++++++++++++++++++ docs/nest/README.md | 13 ++++-- sidebars.js | 11 ++++- 5 files changed, 234 insertions(+), 8 deletions(-) create mode 100644 docs/cli/commands/README.md create mode 100644 docs/cli/commands/publish.md diff --git a/docs/cli/README.md b/docs/cli/README.md index 9bc7dec..41d5497 100644 --- a/docs/cli/README.md +++ b/docs/cli/README.md @@ -4,10 +4,54 @@ sidebar_label: Introduction slug: /cli --- -:::caution Not a 404 but almost +:::caution Work in progress -This page is a work in progress. +Until the release of nest 1.0.0, the current CLI for nest is [eggs](../eggs/README.md). +In the future, [eggs](../eggs/README.md) will be a reference module manager that has first-class support for Nest including private modules. Other module managers can use this reference to integrate Nest into their software. + +::: + +The nest command line interface allows developers to easily create and publish modules on [nest.land](https://nest.land). + +It's written in TypesScript, utilizing the power of Deno. It's lightweight yet efficient, and it provides an easy and safe way for developers to manage their modules. + +## Getting started + +**INSTALL** + +```shell script +deno install -Afq https://nest.land/-/nest/nest.ts +``` + +**PUBLISH** + +Log into your Nest account + +```shell script +nest login +``` + +:::note New to Nest.land? +[Create an account](https://nest.land/#). ::: -[More info](https://github.com/nestdotland/cli) +Initialize a nest module + +```shell script +cd +nest init # follow the prompts +``` + +Publish to Nest + +```shell script +nest publish +``` + +You should now see your module on the [gallery](https://nest.land/gallery)! + +## Contributing + +Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. [Learn more](https://github.com/nestdotland/nest/.github/CONTRIBUTING.md) + diff --git a/docs/cli/commands/README.md b/docs/cli/commands/README.md new file mode 100644 index 0000000..629d39b --- /dev/null +++ b/docs/cli/commands/README.md @@ -0,0 +1,87 @@ +--- +title: Introduction +sidebar_label: Introduction +slug: /cli/commands +--- + +## Usage + +```shell script +nest [command] +``` + +### `[command]` + +A command to run, help by default. + +## Commands + +### [help] + +Show this help or the help of a sub-command + +### [init] + +Initiate a new module for the nest.land registry + +### [setup] + +Link current directory to an existing module + +### [sync] + +Synchronize remote and local configuration + +### [publish](./publish.md) + +Publish your module to the nest.land registry + +### [upgrade] + +Upgrade nest cli to the given version + +### [login] + +Add an existing user account + +### [switch] + +Change currently logged in user + +### [logout] + +Remove an existing user account + +## Options + +### `-h, --help` + +Show help of a command + +### `-V, --version` + +Display version number + +### `-L, --log-level ` + +Set log level + +:::note Default value +`"info"` +::: + +### `-l, --log ` + +Specify filepath to output logs + +:::note Default value +`"nest-debug.log"` +::: + +### `-G, --gui` + +Perform the task in the gui + +:::caution +Not implemented yet +::: diff --git a/docs/cli/commands/publish.md b/docs/cli/commands/publish.md new file mode 100644 index 0000000..0712976 --- /dev/null +++ b/docs/cli/commands/publish.md @@ -0,0 +1,81 @@ +--- +title: Publish command +sidebar_label: Publish +--- + +## Description + +Publish your module to the nest.land registry + +## Arguments + +```shell script +nest publish [version] +``` + +### `[version]` + +[Semver tag](https://semver.org/) or one of "major", "minor", "patch" + +:::note Default value +`"patch"` + +If no version is published yet, defaults to `"0.1.0"` +::: + +## Options + +### `-Y, --yes` + +Disable confirmation prompts + +### `-d, --dry-run` + +No changes will actually be made, reports the details of what would have been published + +### `-g, --git-tag` + +Use the latest git tag as version (ignored if `[version]` is provided) + +### `--pre [tag]` + +Publish as a prerelease with optional identifier + +### `--deno ` + +[Semver range](https://github.com/nestdotland/semver#ranges) for supported deno versions + +### `-w, --wallet ` + +Path to custom arweave wallet + +### `--unlisted` + +Publish as an unlisted version + +## Examples + +```shell script +# say the current version is module@1.0.0 + +nest publish # module@1.0.1 +nest publish 1.2.3 # module@1.2.3 +nest publish patch # module@1.0.1 +nest publish minor # module@1.1.0 +nest publish major # module@2.0.0 + +nest publish --pre # module@1.0.1-0 +nest publish 1.2.3 --pre # module@1.2.3-0 +nest publish patch --pre # module@1.0.1-0 +nest publish minor --pre # module@1.1.0-0 +nest publish major --pre # module@2.0.0-0 + +nest publish --pre alpha # module@1.0.1-alpha.0 +nest publish 1.2.3 --pre beta # module@1.2.3-beta.0 +nest publish patch --pre rc # module@1.0.1-rc.0 +nest publish minor --pre asdf # module@1.1.0-asdf.0 +nest publish major --pre pre # module@1.0.1-pre.0 + +nest --deno ^1.7.1 +nest --deno ">=1.2.3 <1.7.0" +``` diff --git a/docs/nest/README.md b/docs/nest/README.md index ce537d8..e835ac9 100644 --- a/docs/nest/README.md +++ b/docs/nest/README.md @@ -1,5 +1,5 @@ --- -title: Nest +title: Nest.land sidebar_label: Introduction slug: / --- @@ -34,6 +34,13 @@ You can find our source code [here](https://github.com/nestdotland). 2. Your code is served from a truly decentralized network of computers from around the world. 3. You don't need to vendor your modules! -## Questions? +## Staying informed -Start a [GitHub Discussion](https://github.com/nestdotland/nest.land/discussions) or [tweet at us](https://twitter.com/nestdotland)! +- [Github](https://github.com/nestdotland) +- [Twitter](https://twitter.com/nestdotland) +- [Discord](https://discord.gg/hYUsX3H) +- [Blog](https://nest.land/blog) + +## Something missing / Questions ? + +If you find issues with the documentation or have suggestions on how to improve the documentation or the project in general, please [file an issue](https://github.com/nestdotland/nest.land/issues/new/choose) for us, start a new [GitHub Discussion](https://github.com/nestdotland/nest.land/discussions) or [tweet at us](https://twitter.com/nestdotland)! diff --git a/sidebars.js b/sidebars.js index 30fa14d..8656c31 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,7 +1,14 @@ module.exports = { someSidebar: { - Nest: ["nest/README"], - "Nest CLI": ["cli/README"], + "Nest.land": ["nest/README"], + "Nest CLI": ["cli/README", + { + Commands: [ + "cli/commands/README", + "cli/commands/publish" + ] + } + ], Eggs: [ "eggs/README", "eggs/installation", From 4e7b5e3c15ad33527c7ff8c882f2ea6d6d823b70 Mon Sep 17 00:00:00 2001 From: oganexon Date: Thu, 4 Feb 2021 16:55:20 +0100 Subject: [PATCH 2/8] chore: :art: file structure --- docs/cli/cicd.md | 4 ++++ docs/cli/commands/publish.md | 6 ++---- docs/cli/configuration/ignore.md | 4 ++++ docs/cli/configuration/module.json.md | 4 ++++ docs/cli/{commands/README.md => overview.md} | 5 ++--- sidebars.js | 18 ++++++++++++------ 6 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 docs/cli/cicd.md create mode 100644 docs/cli/configuration/ignore.md create mode 100644 docs/cli/configuration/module.json.md rename docs/cli/{commands/README.md => overview.md} (93%) diff --git a/docs/cli/cicd.md b/docs/cli/cicd.md new file mode 100644 index 0000000..3b2a970 --- /dev/null +++ b/docs/cli/cicd.md @@ -0,0 +1,4 @@ +--- +title: Continuous Integration / Continuous Development +sidebar_label: CI/CD +--- diff --git a/docs/cli/commands/publish.md b/docs/cli/commands/publish.md index 0712976..fa3d4ef 100644 --- a/docs/cli/commands/publish.md +++ b/docs/cli/commands/publish.md @@ -1,10 +1,8 @@ --- -title: Publish command -sidebar_label: Publish +title: nest publish +sidebar_label: publish --- -## Description - Publish your module to the nest.land registry ## Arguments diff --git a/docs/cli/configuration/ignore.md b/docs/cli/configuration/ignore.md new file mode 100644 index 0000000..64e1fe6 --- /dev/null +++ b/docs/cli/configuration/ignore.md @@ -0,0 +1,4 @@ +--- +title: ignore +sidebar_label: ignore +--- diff --git a/docs/cli/configuration/module.json.md b/docs/cli/configuration/module.json.md new file mode 100644 index 0000000..d0d30ca --- /dev/null +++ b/docs/cli/configuration/module.json.md @@ -0,0 +1,4 @@ +--- +title: module.json +sidebar_label: module.json +--- diff --git a/docs/cli/commands/README.md b/docs/cli/overview.md similarity index 93% rename from docs/cli/commands/README.md rename to docs/cli/overview.md index 629d39b..629d60c 100644 --- a/docs/cli/commands/README.md +++ b/docs/cli/overview.md @@ -1,7 +1,6 @@ --- -title: Introduction -sidebar_label: Introduction -slug: /cli/commands +title: Overview +sidebar_label: Overview --- ## Usage diff --git a/sidebars.js b/sidebars.js index 8656c31..c7778f0 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,13 +1,19 @@ module.exports = { someSidebar: { "Nest.land": ["nest/README"], - "Nest CLI": ["cli/README", + "Nest CLI": [ + "cli/README", + "cli/overview", { - Commands: [ - "cli/commands/README", - "cli/commands/publish" - ] - } + Commands: ["cli/commands/publish"], + }, + { + "Configuration files": [ + "cli/configuration/module.json", + "cli/configuration/ignore", + ], + }, + "cli/cicd", ], Eggs: [ "eggs/README", From faf4850ea5348b3c858ae763279c536b0ed16efc Mon Sep 17 00:00:00 2001 From: oganexon Date: Thu, 4 Feb 2021 23:46:15 +0100 Subject: [PATCH 3/8] chore: :truck: change doc structure --- docs/cli/README.md | 14 +++--- docs/cli/commands/publish.md | 54 +++++++++------------- docs/cli/faq.md | 4 ++ docs/cli/overview.md | 86 ------------------------------------ sidebars.js | 2 +- 5 files changed, 31 insertions(+), 129 deletions(-) create mode 100644 docs/cli/faq.md delete mode 100644 docs/cli/overview.md diff --git a/docs/cli/README.md b/docs/cli/README.md index 41d5497..368cb4c 100644 --- a/docs/cli/README.md +++ b/docs/cli/README.md @@ -1,6 +1,6 @@ --- -title: Nest CLI -sidebar_label: Introduction +title: Getting started +sidebar_label: Getting started slug: /cli --- @@ -16,15 +16,13 @@ The nest command line interface allows developers to easily create and publish m It's written in TypesScript, utilizing the power of Deno. It's lightweight yet efficient, and it provides an easy and safe way for developers to manage their modules. -## Getting started - -**INSTALL** +### Install ```shell script deno install -Afq https://nest.land/-/nest/nest.ts ``` -**PUBLISH** +### Publish Log into your Nest account @@ -49,9 +47,9 @@ Publish to Nest nest publish ``` -You should now see your module on the [gallery](https://nest.land/gallery)! +You should now see your module on the [gallery](https://nest.land/gallery) ! ## Contributing -Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. [Learn more](https://github.com/nestdotland/nest/.github/CONTRIBUTING.md) +Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. [Learn more](https://github.com/nestdotland/nest/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/cli/commands/publish.md b/docs/cli/commands/publish.md index fa3d4ef..1bfbd61 100644 --- a/docs/cli/commands/publish.md +++ b/docs/cli/commands/publish.md @@ -5,51 +5,37 @@ sidebar_label: publish Publish your module to the nest.land registry -## Arguments - ```shell script nest publish [version] ``` -### `[version]` +## Arguments -[Semver tag](https://semver.org/) or one of "major", "minor", "patch" + argument | default | description + -------- | ------- | ----------- + version | `"patch"` | [Semver tag](https://semver.org/) or one of "major", "minor", "patch" -:::note Default value -`"patch"` +If a release type is provided as `version`, increments the previous version from the given release type. See [examples](#examples) below. -If no version is published yet, defaults to `"0.1.0"` +:::info +If no version is published yet, `version` defaults to `0.1.0` ::: ## Options -### `-Y, --yes` - -Disable confirmation prompts - -### `-d, --dry-run` - -No changes will actually be made, reports the details of what would have been published - -### `-g, --git-tag` - -Use the latest git tag as version (ignored if `[version]` is provided) - -### `--pre [tag]` - -Publish as a prerelease with optional identifier - -### `--deno ` - -[Semver range](https://github.com/nestdotland/semver#ranges) for supported deno versions - -### `-w, --wallet ` - -Path to custom arweave wallet - -### `--unlisted` - -Publish as an unlisted version + options | description + ------- | ----------- + `-Y, --yes` | Disable confirmation prompts + `-d, --dry-run` | No changes will actually be made, reports the details of what would have been published + `-g, --git-tag` | Use the latest git tag as version (ignored if `[version]` is provided) + `--pre [tag]` | Publish as a prerelease with optional identifier + `--deno ` | [Semver range](https://github.com/nestdotland/semver#ranges) for supported deno versions + `-w, --wallet ` | Path to custom arweave wallet + `--unlisted` | Publish as an unlisted version + +:::tip +Use `--git-tag` when publishing to [deno.land](https://deno.land) and [nest.land](https://nest.land) on Github. +::: ## Examples diff --git a/docs/cli/faq.md b/docs/cli/faq.md new file mode 100644 index 0000000..f59ac7f --- /dev/null +++ b/docs/cli/faq.md @@ -0,0 +1,4 @@ +--- +title: FAQ +sidebar_label: FAQ +--- \ No newline at end of file diff --git a/docs/cli/overview.md b/docs/cli/overview.md deleted file mode 100644 index 629d60c..0000000 --- a/docs/cli/overview.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Overview -sidebar_label: Overview ---- - -## Usage - -```shell script -nest [command] -``` - -### `[command]` - -A command to run, help by default. - -## Commands - -### [help] - -Show this help or the help of a sub-command - -### [init] - -Initiate a new module for the nest.land registry - -### [setup] - -Link current directory to an existing module - -### [sync] - -Synchronize remote and local configuration - -### [publish](./publish.md) - -Publish your module to the nest.land registry - -### [upgrade] - -Upgrade nest cli to the given version - -### [login] - -Add an existing user account - -### [switch] - -Change currently logged in user - -### [logout] - -Remove an existing user account - -## Options - -### `-h, --help` - -Show help of a command - -### `-V, --version` - -Display version number - -### `-L, --log-level ` - -Set log level - -:::note Default value -`"info"` -::: - -### `-l, --log ` - -Specify filepath to output logs - -:::note Default value -`"nest-debug.log"` -::: - -### `-G, --gui` - -Perform the task in the gui - -:::caution -Not implemented yet -::: diff --git a/sidebars.js b/sidebars.js index c7778f0..599e89f 100644 --- a/sidebars.js +++ b/sidebars.js @@ -3,7 +3,6 @@ module.exports = { "Nest.land": ["nest/README"], "Nest CLI": [ "cli/README", - "cli/overview", { Commands: ["cli/commands/publish"], }, @@ -13,6 +12,7 @@ module.exports = { "cli/configuration/ignore", ], }, + "cli/faq", "cli/cicd", ], Eggs: [ From 6fc34cf0a7f8d2627a8bcf33440245beb4101e8a Mon Sep 17 00:00:00 2001 From: oganexon Date: Fri, 5 Feb 2021 15:07:24 +0100 Subject: [PATCH 4/8] feat: :sparkles: commands --- docs/cli/commands/help.md | 28 ++++++++++++++++++ docs/cli/commands/init.md | 43 ++++++++++++++++++++++++++++ docs/cli/commands/login.md | 35 ++++++++++++++++++++++ docs/cli/commands/logout.md | 29 +++++++++++++++++++ docs/cli/commands/publish.md | 8 ++++-- docs/cli/commands/setup.md | 29 +++++++++++++++++++ docs/cli/commands/switch.md | 31 ++++++++++++++++++++ docs/cli/commands/sync.md | 16 +++++++++++ docs/cli/commands/upgrade.md | 23 +++++++++++++++ docs/cli/configuration/data.json.md | 4 +++ docs/cli/configuration/users.json.md | 4 +++ docs/nest/README.md | 2 +- sidebars.js | 14 ++++++++- 13 files changed, 261 insertions(+), 5 deletions(-) create mode 100644 docs/cli/commands/help.md create mode 100644 docs/cli/commands/init.md create mode 100644 docs/cli/commands/login.md create mode 100644 docs/cli/commands/logout.md create mode 100644 docs/cli/commands/setup.md create mode 100644 docs/cli/commands/switch.md create mode 100644 docs/cli/commands/sync.md create mode 100644 docs/cli/commands/upgrade.md create mode 100644 docs/cli/configuration/data.json.md create mode 100644 docs/cli/configuration/users.json.md diff --git a/docs/cli/commands/help.md b/docs/cli/commands/help.md new file mode 100644 index 0000000..6064ad6 --- /dev/null +++ b/docs/cli/commands/help.md @@ -0,0 +1,28 @@ +--- +title: nest help +sidebar_label: help +--- + +Show the global help or the help of a sub-command. + +```shell script +nest help [...command] +``` + +## Arguments + + argument | description + -------- | ----------- + ...command | A command or a sub-command + +:::info +Show the global help if no command is provided +::: + +## Examples + +```shell script +nest help +nest help login +nest help publish 1.2.5 --pre +``` diff --git a/docs/cli/commands/init.md b/docs/cli/commands/init.md new file mode 100644 index 0000000..b0b0a6e --- /dev/null +++ b/docs/cli/commands/init.md @@ -0,0 +1,43 @@ +--- +title: nest init +sidebar_label: init +--- + +Initiate a new module for the nest.land registry. Will create the necessary configuration files. + +```shell script +nest init +``` + +:::tip +Use [`nest setup`](./setup.md) if your module already exists ! +::: + +## Prompts + +```script shell +Initialize directory ? > +``` +Exits if `false` + +```script shell +Link to an existing module? > +``` + +:::info +If you answer `yes`, behaves in the same way as the [`nest setup`](./setup.md) command. +::: + +```script shell +Module name > +Module full name > +Description > +Homepage > +Homepage > +``` + +## Examples + +```shell script +nest init +``` diff --git a/docs/cli/commands/login.md b/docs/cli/commands/login.md new file mode 100644 index 0000000..3013a6f --- /dev/null +++ b/docs/cli/commands/login.md @@ -0,0 +1,35 @@ +--- +title: nest login +sidebar_label: login +--- + +Add an existing user account. + +```shell script +nest login [username] [token] +``` + +See [users.json](../configuration/users.json.md) for technical details. + +:::note New to Nest.land? +[Create an account](https://nest.land/#). +::: + +## Arguments + + argument | description + -------- | ----------- + username | A username + token | A login token + +:::info +If `[username]` or `[token]` is missing, you will be prompted to enter it. +::: + +## Examples + +```shell script +nest login +nest login me +nest login me OltCnjbXVnkNYIr60/4IvA== +``` diff --git a/docs/cli/commands/logout.md b/docs/cli/commands/logout.md new file mode 100644 index 0000000..d09c684 --- /dev/null +++ b/docs/cli/commands/logout.md @@ -0,0 +1,29 @@ +--- +title: nest logout +sidebar_label: logout +--- + +Remove an existing user account. + +```shell script +nest login [username] +``` + +See [users.json](../configuration/users.json.md) for technical details. + +## Arguments + + argument | description + -------- | ----------- + username | A username + +:::info +If `[username]` is missing, you will be prompted to enter it. +::: + +## Examples + +```shell script +nest login +nest login me +``` diff --git a/docs/cli/commands/publish.md b/docs/cli/commands/publish.md index 1bfbd61..ed472af 100644 --- a/docs/cli/commands/publish.md +++ b/docs/cli/commands/publish.md @@ -3,7 +3,7 @@ title: nest publish sidebar_label: publish --- -Publish your module to the nest.land registry +Publish your module to the nest.land registry. ```shell script nest publish [version] @@ -59,7 +59,9 @@ nest publish 1.2.3 --pre beta # module@1.2.3-beta.0 nest publish patch --pre rc # module@1.0.1-rc.0 nest publish minor --pre asdf # module@1.1.0-asdf.0 nest publish major --pre pre # module@1.0.1-pre.0 +``` -nest --deno ^1.7.1 -nest --deno ">=1.2.3 <1.7.0" +```shell script +nest publish --deno ^1.7.1 +nest publish --deno ">=1.2.3 <1.7.0" ``` diff --git a/docs/cli/commands/setup.md b/docs/cli/commands/setup.md new file mode 100644 index 0000000..29c6262 --- /dev/null +++ b/docs/cli/commands/setup.md @@ -0,0 +1,29 @@ +--- +title: nest setup +sidebar_label: setup +--- + +Link current directory to an existing module. + +```shell script +nest setup [author] [module] +``` + +## Arguments + + argument | description + -------- | ----------- + author | A module author + module | A module name + +:::info +If `[author]` or `[module]` is missing, you will be prompted to enter it. +::: + +## Examples + +```shell script +nest setup +nest setup me +nest setup me my-module +``` diff --git a/docs/cli/commands/switch.md b/docs/cli/commands/switch.md new file mode 100644 index 0000000..9212193 --- /dev/null +++ b/docs/cli/commands/switch.md @@ -0,0 +1,31 @@ +--- +title: nest switch +sidebar_label: switch +--- + +Publish your module to the nest.land registry. + +```shell script +nest switch [username] +``` + +:::tip +Use this command when you need to work on multiple projects with different accounts. +::: + +## Arguments + + argument | description + -------- | ----------- + username | A username + +:::info +If `[username]` is missing, you will be prompted to enter it. +::: + +## Examples + +```shell script +nest switch +nest switch user12648 +``` diff --git a/docs/cli/commands/sync.md b/docs/cli/commands/sync.md new file mode 100644 index 0000000..1f41772 --- /dev/null +++ b/docs/cli/commands/sync.md @@ -0,0 +1,16 @@ +--- +title: nest sync +sidebar_label: sync +--- + +Synchronize remote and local configuration. + +```shell script +nest sync +``` + +## Examples + +```shell script +nest sync +``` diff --git a/docs/cli/commands/upgrade.md b/docs/cli/commands/upgrade.md new file mode 100644 index 0000000..5b60a02 --- /dev/null +++ b/docs/cli/commands/upgrade.md @@ -0,0 +1,23 @@ +--- +title: nest upgrade +sidebar_label: upgrade +--- + +Upgrade nest cli to the given version. + +```shell script +nest upgrade [version] +``` + +## Arguments + + argument | default | description + -------- | ------- | ----------- + version | latest | A given semver version + +## Examples + +```shell script +nest upgrade +nest upgrade 1.0.0 +``` diff --git a/docs/cli/configuration/data.json.md b/docs/cli/configuration/data.json.md new file mode 100644 index 0000000..dbdf6b3 --- /dev/null +++ b/docs/cli/configuration/data.json.md @@ -0,0 +1,4 @@ +--- +title: data.json +sidebar_label: data.json +--- diff --git a/docs/cli/configuration/users.json.md b/docs/cli/configuration/users.json.md new file mode 100644 index 0000000..9618563 --- /dev/null +++ b/docs/cli/configuration/users.json.md @@ -0,0 +1,4 @@ +--- +title: users.json +sidebar_label: users.json +--- diff --git a/docs/nest/README.md b/docs/nest/README.md index e835ac9..305c855 100644 --- a/docs/nest/README.md +++ b/docs/nest/README.md @@ -43,4 +43,4 @@ You can find our source code [here](https://github.com/nestdotland). ## Something missing / Questions ? -If you find issues with the documentation or have suggestions on how to improve the documentation or the project in general, please [file an issue](https://github.com/nestdotland/nest.land/issues/new/choose) for us, start a new [GitHub Discussion](https://github.com/nestdotland/nest.land/discussions) or [tweet at us](https://twitter.com/nestdotland)! +If you find issues with the documentation or have suggestions on how to improve the documentation or the project in general, please [file an issue](https://github.com/nestdotland/nest.land/issues/new/choose) for us, start a new [GitHub Discussion](https://github.com/nestdotland/nest.land/discussions), or [tweet at us](https://twitter.com/nestdotland)! diff --git a/sidebars.js b/sidebars.js index 599e89f..8cf1bd9 100644 --- a/sidebars.js +++ b/sidebars.js @@ -4,12 +4,24 @@ module.exports = { "Nest CLI": [ "cli/README", { - Commands: ["cli/commands/publish"], + Commands: [ + "cli/commands/help", + "cli/commands/init", + "cli/commands/login", + "cli/commands/logout", + "cli/commands/publish", + "cli/commands/setup", + "cli/commands/switch", + "cli/commands/sync", + "cli/commands/upgrade", + ], }, { "Configuration files": [ "cli/configuration/module.json", "cli/configuration/ignore", + "cli/configuration/data.json", + "cli/configuration/users.json", ], }, "cli/faq", From 6905ca45fccdfa958d19031106381a96908ecb4a Mon Sep 17 00:00:00 2001 From: oganexon Date: Sat, 6 Feb 2021 00:09:16 +0100 Subject: [PATCH 5/8] feat: config files --- docs/cli/configuration/data.json.md | 4 ++ docs/cli/configuration/ignore.md | 54 ++++++++++++++++++++++++++ docs/cli/configuration/module.json.md | 55 +++++++++++++++++++++++++++ docs/cli/configuration/users.json.md | 4 ++ docs/cli/faq.md | 23 ++++++++++- 5 files changed, 139 insertions(+), 1 deletion(-) diff --git a/docs/cli/configuration/data.json.md b/docs/cli/configuration/data.json.md index dbdf6b3..6c609c6 100644 --- a/docs/cli/configuration/data.json.md +++ b/docs/cli/configuration/data.json.md @@ -2,3 +2,7 @@ title: data.json sidebar_label: data.json --- + +:::danger +`data.json` is an autogenerated file. Do not edit this file directly. +::: diff --git a/docs/cli/configuration/ignore.md b/docs/cli/configuration/ignore.md index 64e1fe6..5ebd714 100644 --- a/docs/cli/configuration/ignore.md +++ b/docs/cli/configuration/ignore.md @@ -2,3 +2,57 @@ title: ignore sidebar_label: ignore --- + +An `ignore` file specifies intentionally files that nest should ignore. Each line in an `ignore` file specifies a pattern. + +The syntax of nest's `ignore` file is a superset of the [`.gitignore` pattern format](https://git-scm.com/docs/gitignore#_pattern_format). + +## Pattern format + + - A blank line matches no files, so it can serve as a separator for readability. + + - A line starting with # serves as a comment. Put a backslash ("`\`") in front of the first hash for patterns that begin with a hash. + + - Trailing spaces are ignored unless they are quoted with backslash ("`\`"). + + - An optional prefix "`!`" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn't list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. Put a backslash ("`\`") in front of the first "`!`" for patterns that begin with a literal "`!`", for example, "`\!important!.txt`". + + - The slash / is used as the directory separator. Separators may occur at the beginning, middle or end of the `ignore` search pattern. + + - If there is a separator at the beginning or middle (or both) of the pattern, then the pattern is relative to the directory level of the particular `ignore` file itself. Otherwise the pattern may also match at any level below the `ignore` level. + + - If there is a separator at the end of the pattern then the pattern will only match directories, otherwise the pattern can match both files and directories. + + - For example, a pattern `doc/frotz/` matches `doc/frotz` directory, but not `a/doc/frotz` directory; however `frotz/` matches `frotz` and `a/frotz` that is a directory (all paths are relative from the `ignore` file). + + - An asterisk "`*`" matches anything except a slash. The character "`?`" matches any one character except "`/`". The range notation, e.g. `[a-zA-Z]`, can be used to match one of the characters in a range. + +Two consecutive asterisks ("`**`") in patterns matched against full pathname may have special meaning: + + - A leading "`**`" followed by a slash means match in all directories. For example, "`**/foo`" matches file or directory "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`" matches file or directory "`bar`" anywhere that is directly under directory "`foo`". + + - A trailing "`/**`" matches everything inside. For example, "`abc/**`" matches all files inside directory "`abc`", relative to the location of the `ignore` file, with infinite depth. + + - A slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, "`a/**/b`" matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on. + + - Other consecutive asterisks are considered regular asterisks and will match according to the previous rules. + +## `@extends` keyword + +You can import other files with the `@extends` keyword. The extended file must follow the same syntax. + +:::tip +Use the `@extends` keyword to avoid duplicating the content of your `.gitignore` file. +::: + +## Examples + +```shell script +@extends .gitignore + +# exclude everything except directory foo/bar +/* +!/foo +/foo/* +!/foo/bar +``` \ No newline at end of file diff --git a/docs/cli/configuration/module.json.md b/docs/cli/configuration/module.json.md index d0d30ca..2454db3 100644 --- a/docs/cli/configuration/module.json.md +++ b/docs/cli/configuration/module.json.md @@ -2,3 +2,58 @@ title: module.json sidebar_label: module.json --- + +The metadata file of your module. + +None of the properties described in this section are required to publish your module. However, it brings valuable information on your module that helps users to use it. + +| field | type | description | +| ----------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| main | `string` | A file path to the primary entry point to your program. | +| bin | `string[]` | An array of file path to one or more executable files. | +| fullName | `string` | A longer name, without character restrictions or length limit. | +| description | `string` | This helps people discover your module by explaining its purpose. | +| logo | `string` | A file path to your module logo. Will be displayed when module is featured. | +| homepage | `string` | The url to the project homepage. | +| repository | `string` | Specify the place where your code lives. This is helpful for people who want to contribute. | +| issues | `string` | The url to your project's issue tracker and / or the email address to which issues should be reported. | +| license | `string` | You should specify a license for your module so that people know how they are permitted to use it, and any restrictions you're placing on it. | +| unlisted | `boolean` | The module will not be found on the website unless you have the exact link. | +| private | `boolean` | Encrypts your module on the blockweave. You can fetch it and decrypt it through the eggs CLI. (not implemented yet) | +| keywords | `string[]` | It helps people to find your module when searching for it. | +| hooks | `Hooks` | Hooks are scripts that nest executes before or after events such as: publish, and sync. | + +## Hooks + +To create "pre" or "post" hooks for any valid event in the `hooks` section of the module.json, simply create another key with a matching name and add "pre" or "post" to the beginning of them. + +Valid events: + - `publish` + - `sync` + +## Example + +Here is an example of a complete configuration: + +```json +{ + "main": "nest.ts", + "bin": ["bin/cli.ts", "eggs.ts"], + "fullName": "Nest CLI", + "description": "Nest's official CLI to manage your modules", + "logo": "assets/logo.png", + "homepage": "https://nest.land", + "repository": "https://github.com/nestdotland/nest", + "issues": "https://github.com/nestdotland/nest/issues", + "license": "MIT", + "unlisted": false, + "private": false, + "keywords": ["cli", "registry", "nest" ], + "hooks": { + "prepublish": "deno fmt --check", + "postpublish": "echo Success!", + "presync": "sleep 3", + "postsync": "cat .nest/module.json" + } +} +``` \ No newline at end of file diff --git a/docs/cli/configuration/users.json.md b/docs/cli/configuration/users.json.md index 9618563..db41099 100644 --- a/docs/cli/configuration/users.json.md +++ b/docs/cli/configuration/users.json.md @@ -2,3 +2,7 @@ title: users.json sidebar_label: users.json --- + +:::danger +`users.json` is an autogenerated file. Do not edit this file directly. +::: diff --git a/docs/cli/faq.md b/docs/cli/faq.md index f59ac7f..48b878a 100644 --- a/docs/cli/faq.md +++ b/docs/cli/faq.md @@ -1,4 +1,25 @@ --- title: FAQ sidebar_label: FAQ ---- \ No newline at end of file +--- + +### Why do I have a directory named `.nest` in my project? + +The `.nest` directory is created when you link a directory to a Nest module. + +### What does this directory contain? + +The `module.json` file contains metadata about the module + +The `ignore` file contains a list of files that are ignored or included + +The `data.json` file is an auto generated file. This file should **NOT** be directly edited by the user. + +### Should I commit the `.nest` directory? + +**No**, you should not commit the `.nest` directory to your repository. +Upon creation, it will be automatically added to your `.gitignore` file. + +### Why are Nest CLI and eggs separate? + +Nest CLI is the main utility you would use to create and publish modules. Eggs on the other hand, is just a reference module manager that has first-class support for Nest including private modules. Other module managers can use this reference to integrate Nest into their software. From 10cfa4ab267eba3d2a30510b02fa4b8ced9fedfd Mon Sep 17 00:00:00 2001 From: oganexon Date: Sat, 6 Feb 2021 11:09:14 +0100 Subject: [PATCH 6/8] docs: :fire: remove autogenerated files --- docs/cli/commands/help.md | 6 +++--- docs/cli/commands/login.md | 8 ++++---- docs/cli/commands/logout.md | 12 ++++++------ docs/cli/commands/publish.md | 24 ++++++++++++------------ docs/cli/commands/setup.md | 8 ++++---- docs/cli/commands/switch.md | 6 +++--- docs/cli/commands/upgrade.md | 6 +++--- docs/cli/configuration/data.json.md | 8 -------- docs/cli/configuration/module.json.md | 10 +++++++++- docs/cli/configuration/users.json.md | 8 -------- 10 files changed, 44 insertions(+), 52 deletions(-) delete mode 100644 docs/cli/configuration/data.json.md delete mode 100644 docs/cli/configuration/users.json.md diff --git a/docs/cli/commands/help.md b/docs/cli/commands/help.md index 6064ad6..a048612 100644 --- a/docs/cli/commands/help.md +++ b/docs/cli/commands/help.md @@ -11,9 +11,9 @@ nest help [...command] ## Arguments - argument | description - -------- | ----------- - ...command | A command or a sub-command + | argument | description | + | ---------- | -------------------------- | + | ...command | A command or a sub-command | :::info Show the global help if no command is provided diff --git a/docs/cli/commands/login.md b/docs/cli/commands/login.md index 3013a6f..804ba74 100644 --- a/docs/cli/commands/login.md +++ b/docs/cli/commands/login.md @@ -17,10 +17,10 @@ See [users.json](../configuration/users.json.md) for technical details. ## Arguments - argument | description - -------- | ----------- - username | A username - token | A login token + | argument | description | + | -------- | ------------- | + | username | A username | + | token | A login token | :::info If `[username]` or `[token]` is missing, you will be prompted to enter it. diff --git a/docs/cli/commands/logout.md b/docs/cli/commands/logout.md index d09c684..2666ade 100644 --- a/docs/cli/commands/logout.md +++ b/docs/cli/commands/logout.md @@ -6,16 +6,16 @@ sidebar_label: logout Remove an existing user account. ```shell script -nest login [username] +nest logout [username] ``` See [users.json](../configuration/users.json.md) for technical details. ## Arguments - argument | description - -------- | ----------- - username | A username + | argument | description | + | -------- | ----------- | + | username | A username | :::info If `[username]` is missing, you will be prompted to enter it. @@ -24,6 +24,6 @@ If `[username]` is missing, you will be prompted to enter it. ## Examples ```shell script -nest login -nest login me +nest logout +nest logout me ``` diff --git a/docs/cli/commands/publish.md b/docs/cli/commands/publish.md index ed472af..9641e74 100644 --- a/docs/cli/commands/publish.md +++ b/docs/cli/commands/publish.md @@ -11,9 +11,9 @@ nest publish [version] ## Arguments - argument | default | description - -------- | ------- | ----------- - version | `"patch"` | [Semver tag](https://semver.org/) or one of "major", "minor", "patch" + | argument | default | description | + | -------- | --------- | --------------------------------------------------------------------- | + | version | `"patch"` | [Semver tag](https://semver.org/) or one of "major", "minor", "patch" | If a release type is provided as `version`, increments the previous version from the given release type. See [examples](#examples) below. @@ -23,15 +23,15 @@ If no version is published yet, `version` defaults to `0.1.0` ## Options - options | description - ------- | ----------- - `-Y, --yes` | Disable confirmation prompts - `-d, --dry-run` | No changes will actually be made, reports the details of what would have been published - `-g, --git-tag` | Use the latest git tag as version (ignored if `[version]` is provided) - `--pre [tag]` | Publish as a prerelease with optional identifier - `--deno ` | [Semver range](https://github.com/nestdotland/semver#ranges) for supported deno versions - `-w, --wallet ` | Path to custom arweave wallet - `--unlisted` | Publish as an unlisted version + | options | description | + | --------------------- | ---------------------------------------------------------------------------------------- | + | `-Y, --yes` | Disable confirmation prompts | + | `-d, --dry-run` | No changes will actually be made, reports the details of what would have been published | + | `-g, --git-tag` | Use the latest git tag as version (ignored if `[version]` is provided) | + | `--pre [tag]` | Publish as a prerelease with optional identifier | + | `--deno ` | [Semver range](https://github.com/nestdotland/semver#ranges) for supported deno versions | + | `-w, --wallet ` | Path to custom arweave wallet | + | `--unlisted` | Publish as an unlisted version | :::tip Use `--git-tag` when publishing to [deno.land](https://deno.land) and [nest.land](https://nest.land) on Github. diff --git a/docs/cli/commands/setup.md b/docs/cli/commands/setup.md index 29c6262..4d307a5 100644 --- a/docs/cli/commands/setup.md +++ b/docs/cli/commands/setup.md @@ -11,10 +11,10 @@ nest setup [author] [module] ## Arguments - argument | description - -------- | ----------- - author | A module author - module | A module name + | argument | description | + | -------- | --------------- | + | author | A module author | + | module | A module name | :::info If `[author]` or `[module]` is missing, you will be prompted to enter it. diff --git a/docs/cli/commands/switch.md b/docs/cli/commands/switch.md index 9212193..999171a 100644 --- a/docs/cli/commands/switch.md +++ b/docs/cli/commands/switch.md @@ -15,9 +15,9 @@ Use this command when you need to work on multiple projects with different accou ## Arguments - argument | description - -------- | ----------- - username | A username + | argument | description | + | -------- | ----------- | + | username | A username | :::info If `[username]` is missing, you will be prompted to enter it. diff --git a/docs/cli/commands/upgrade.md b/docs/cli/commands/upgrade.md index 5b60a02..3ada27d 100644 --- a/docs/cli/commands/upgrade.md +++ b/docs/cli/commands/upgrade.md @@ -11,9 +11,9 @@ nest upgrade [version] ## Arguments - argument | default | description - -------- | ------- | ----------- - version | latest | A given semver version + | argument | default | description | + | -------- | ------- | ---------------------- | + | version | latest | A given semver version | ## Examples diff --git a/docs/cli/configuration/data.json.md b/docs/cli/configuration/data.json.md deleted file mode 100644 index 6c609c6..0000000 --- a/docs/cli/configuration/data.json.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: data.json -sidebar_label: data.json ---- - -:::danger -`data.json` is an autogenerated file. Do not edit this file directly. -::: diff --git a/docs/cli/configuration/module.json.md b/docs/cli/configuration/module.json.md index 2454db3..82b607c 100644 --- a/docs/cli/configuration/module.json.md +++ b/docs/cli/configuration/module.json.md @@ -56,4 +56,12 @@ Here is an example of a complete configuration: "postsync": "cat .nest/module.json" } } -``` \ No newline at end of file +``` + +## data.json + +:::danger +`data.json` is an autogenerated file. Do not edit this file directly. +::: + +This file is used by the CLI to determine the properties that have been changed during synchronization. In addition, you can find out the most recent version published as well as other information provided by the API. diff --git a/docs/cli/configuration/users.json.md b/docs/cli/configuration/users.json.md deleted file mode 100644 index db41099..0000000 --- a/docs/cli/configuration/users.json.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: users.json -sidebar_label: users.json ---- - -:::danger -`users.json` is an autogenerated file. Do not edit this file directly. -::: From 70a5dd78287322d6f363c445d1bc1f471d25e05d Mon Sep 17 00:00:00 2001 From: oganexon Date: Sat, 6 Feb 2021 11:12:26 +0100 Subject: [PATCH 7/8] fix: :bug: sidebar path --- docs/cli/commands/login.md | 2 -- docs/cli/commands/logout.md | 2 -- sidebars.js | 2 -- 3 files changed, 6 deletions(-) diff --git a/docs/cli/commands/login.md b/docs/cli/commands/login.md index 804ba74..a3183fc 100644 --- a/docs/cli/commands/login.md +++ b/docs/cli/commands/login.md @@ -9,8 +9,6 @@ Add an existing user account. nest login [username] [token] ``` -See [users.json](../configuration/users.json.md) for technical details. - :::note New to Nest.land? [Create an account](https://nest.land/#). ::: diff --git a/docs/cli/commands/logout.md b/docs/cli/commands/logout.md index 2666ade..24734bd 100644 --- a/docs/cli/commands/logout.md +++ b/docs/cli/commands/logout.md @@ -9,8 +9,6 @@ Remove an existing user account. nest logout [username] ``` -See [users.json](../configuration/users.json.md) for technical details. - ## Arguments | argument | description | diff --git a/sidebars.js b/sidebars.js index 8cf1bd9..54eadd3 100644 --- a/sidebars.js +++ b/sidebars.js @@ -20,8 +20,6 @@ module.exports = { "Configuration files": [ "cli/configuration/module.json", "cli/configuration/ignore", - "cli/configuration/data.json", - "cli/configuration/users.json", ], }, "cli/faq", From 6b5c0286ef2af1a17e5519dd0391d46be059e07f Mon Sep 17 00:00:00 2001 From: oganexon Date: Wed, 10 Feb 2021 18:21:49 +0100 Subject: [PATCH 8/8] docs: :memo: config command --- docs/cli/commands/config/diff.md | 69 +++++++++++++++++++++++++++ docs/cli/commands/config/pull.md | 27 +++++++++++ docs/cli/commands/config/push.md | 27 +++++++++++ docs/cli/commands/config/status.md | 27 +++++++++++ docs/cli/commands/publish.md | 4 ++ docs/cli/commands/sync.md | 15 +++++- docs/cli/configuration/module.json.md | 8 ++-- sidebars.js | 12 ++++- 8 files changed, 182 insertions(+), 7 deletions(-) create mode 100644 docs/cli/commands/config/diff.md create mode 100644 docs/cli/commands/config/pull.md create mode 100644 docs/cli/commands/config/push.md create mode 100644 docs/cli/commands/config/status.md diff --git a/docs/cli/commands/config/diff.md b/docs/cli/commands/config/diff.md new file mode 100644 index 0000000..fcd6b77 --- /dev/null +++ b/docs/cli/commands/config/diff.md @@ -0,0 +1,69 @@ +--- +title: nest config diff +sidebar_label: diff +--- + +Show changes in local config. + +```shell script +nest config diff +``` + +## Options + + | options | description | + | ----------- | ---------------------------- | + | `-r, --remote` | Compare with remote config | + +:::info +Compares the changes with the data.json file by default. +::: + +## Examples + +```shell script +nest config diff +nest config diff --remote +``` + +```diff + { + fullName: "Nest CLI", + description: "Nest's official CLI to manage your modules", + main: "nest.ts", + bin: [ + "cli.ts", ++ "nest.js", + ], +- logo: "assets/logo.png", ++ logo: "assets/nest.png", + homepage: "https://nest.land/x/author/module", + repository: "https://github.com/nestdotland/nest", + issues: "https://github.com/nestdotland/nest/issues", + license: "MIT", +- unlisted: false, + private: false, + keywords: [ + "cli", + "registry", + "nest", + ], + hooks: { + prepublish: "deno fmt --check", +- postpublish: "echo Success!", + presync: "sleep 3", + postsync: "cat .nest/module.json", + }, + }, +``` +```diff + # List here the files and directories to be ignored, one by line as a glob expression. + +- # Dotfiles are ignored by default. ++ # Dotfiles are ignored by default + .* + ++ *_test.ts ++ .nest ++ +``` \ No newline at end of file diff --git a/docs/cli/commands/config/pull.md b/docs/cli/commands/config/pull.md new file mode 100644 index 0000000..da69eff --- /dev/null +++ b/docs/cli/commands/config/pull.md @@ -0,0 +1,27 @@ +--- +title: nest config pull +sidebar_label: pull +--- + +Fetch from and integrate with remote config. Your local changes will be merged with a diff algorithm. You will be warned if conflicts are found during the merge process. + +```shell script +nest config pull +``` + +## Options + + | options | description | + | ------------- | ---------------------- | + | `-f, --force` | Overwrite local config | + +:::caution +Use the `--force` option only if you need to reset your local config. Resolving merge conflicts is preferable in most cases. +::: + +## Examples + +```shell script +nest config +nest config ---force +``` diff --git a/docs/cli/commands/config/push.md b/docs/cli/commands/config/push.md new file mode 100644 index 0000000..670f7de --- /dev/null +++ b/docs/cli/commands/config/push.md @@ -0,0 +1,27 @@ +--- +title: nest config push +sidebar_label: push +--- + +Update remote config. By default you can only push your configuration if it is newer than the remote configuration or if you have previously pulled the changes. + +```shell script +nest config push +``` + +## Options + + | options | description | + | ------------- | ----------------------- | + | `-f, --force` | Overwrite remote config | + +:::caution +Use the `--force` option only if you need to reset remote config. Resolving merge conflicts is preferable in most cases. +::: + +## Examples + +```shell script +nest config push +nest config push --force +``` diff --git a/docs/cli/commands/config/status.md b/docs/cli/commands/config/status.md new file mode 100644 index 0000000..7909b89 --- /dev/null +++ b/docs/cli/commands/config/status.md @@ -0,0 +1,27 @@ +--- +title: nest config status +sidebar_label: status +--- + +Show the current config status. + +```shell script +nest config status +``` + +## Examples + +```shell script +nest config status +``` +``` +i Local diff status: + - module.json modified + - ignore unchanged + +i Remote diff status: + - module.json modified + - ignore modified + +i Current config is newer than remote config +``` diff --git a/docs/cli/commands/publish.md b/docs/cli/commands/publish.md index 9641e74..86468a2 100644 --- a/docs/cli/commands/publish.md +++ b/docs/cli/commands/publish.md @@ -61,6 +61,10 @@ nest publish minor --pre asdf # module@1.1.0-asdf.0 nest publish major --pre pre # module@1.0.1-pre.0 ``` +```shell script +nest publish --git-tag # module@[latest git tag] +``` + ```shell script nest publish --deno ^1.7.1 nest publish --deno ">=1.2.3 <1.7.0" diff --git a/docs/cli/commands/sync.md b/docs/cli/commands/sync.md index 1f41772..4c5783c 100644 --- a/docs/cli/commands/sync.md +++ b/docs/cli/commands/sync.md @@ -3,12 +3,25 @@ title: nest sync sidebar_label: sync --- -Synchronize remote and local configuration. +Synchronize remote and local configuration. This command is an abstraction of the [pull](config/pull.md) and [push](config/push.md) commands. ```shell script nest sync ``` +:::info +Synchronization logic: +```js +if (local config older than remote config) { + pull config & merge config; + if (conflicts) { + return; + } +} +push config; +``` +::: + ## Examples ```shell script diff --git a/docs/cli/configuration/module.json.md b/docs/cli/configuration/module.json.md index 82b607c..e79d48a 100644 --- a/docs/cli/configuration/module.json.md +++ b/docs/cli/configuration/module.json.md @@ -9,10 +9,10 @@ None of the properties described in this section are required to publish your mo | field | type | description | | ----------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| main | `string` | A file path to the primary entry point to your program. | -| bin | `string[]` | An array of file path to one or more executable files. | | fullName | `string` | A longer name, without character restrictions or length limit. | | description | `string` | This helps people discover your module by explaining its purpose. | +| main | `string` | A file path to the primary entry point to your program. | +| bin | `string[]` | An array of file path to one or more executable files. | | logo | `string` | A file path to your module logo. Will be displayed when module is featured. | | homepage | `string` | The url to the project homepage. | | repository | `string` | Specify the place where your code lives. This is helpful for people who want to contribute. | @@ -37,10 +37,10 @@ Here is an example of a complete configuration: ```json { - "main": "nest.ts", - "bin": ["bin/cli.ts", "eggs.ts"], "fullName": "Nest CLI", "description": "Nest's official CLI to manage your modules", + "main": "nest.ts", + "bin": ["bin/cli.ts", "eggs.ts"], "logo": "assets/logo.png", "homepage": "https://nest.land", "repository": "https://github.com/nestdotland/nest", diff --git a/sidebars.js b/sidebars.js index 54eadd3..449cacf 100644 --- a/sidebars.js +++ b/sidebars.js @@ -7,12 +7,20 @@ module.exports = { Commands: [ "cli/commands/help", "cli/commands/init", + "cli/commands/setup", "cli/commands/login", "cli/commands/logout", - "cli/commands/publish", - "cli/commands/setup", "cli/commands/switch", + "cli/commands/publish", "cli/commands/sync", + { + config: [ + "cli/commands/config/pull", + "cli/commands/config/push", + "cli/commands/config/diff", + "cli/commands/config/status", + ], + }, "cli/commands/upgrade", ], },