Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 26 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,55 +47,54 @@ nf [command] [options]

Used to build your nanoforge project.

`-d, --directory [directory]` specify the directory of the nanoforge project to build.
`-c, --config [config]` path to the config file.
`--client-outDir [clientDirectory]` specifies the client directory.
`--server-outDir [serverDirectory]` specifies the server directory.
- `-d, --directory [directory]` specify the directory of the nanoforge project to build.
- `-c, --config [config]` path to the config file.
- `--client-outDir [clientDirectory]` specifies the client directory.
- `--server-outDir [serverDirectory]` specifies the server directory.

### `generate`

Used to generate nanoforge project files from config

`-d, --directory [directory]` specify the directory of the nanoforge project to build.
`-c, --config [config]` path to the config file.
- `-d, --directory [directory]` specify the directory of the nanoforge project to build.
- `-c, --config [config]` path to the config file.

### `install` or `add`

Used to add a nanoforge library to your project

`-d, --directory [directory]` specify the directory of the nanoforge project to build.
- `-d, --directory [directory]` specify the directory of the nanoforge project to build.

### `new`

Used to create a new nanoforge project

`-d, --directory [directory]` specify the directory of your project
`--name [name]` specify the name of your project
`--path [path]` specify the path of your project
`--package-manager [packageManager]` specify the package manager of your project
`--language [language]` specify the language of your project
`--strict` use strict mode
`--no-strict` do not use strict mode
`--server` create a server
`--no-server` do not create a server
`--init-functions` initialize functions
`--no-init-functions` do not initialize functions
`--skip-install` skip installing dependencies
`--no-skip-install` do not skip installing dependencies
- `-d, --directory [directory]` specify the directory of your project
- `--name [name]` specify the name of your project
- `--path [path]` specify the path of your project
- `--package-manager [packageManager]` specify the package manager of your project
- `--language [language]` specify the language of your project
- `--strict` use strict mode
- `--no-strict` do not use strict mode
- `--server` create a server
- `--no-server` do not create a server
- `--init-functions` initialize functions
- `--no-init-functions` do not initialize functions
- `--skip-install` skip installing dependencies
- `--no-skip-install` do not skip installing dependencies

### `start`

Used to start your nanoforge project

`-d, --directory [directory]` specify the directory of your project
`-c, --config [config]` path to the config file (default: "nanoforge.config.json")
`-p, --client-port [clientPort]` specify the port of the loader (the website to load the game)
`--game-exposure-port [gameExposurePort]` specify the port of the game exposure
`--server-port [serverPort]` specify the port of the server
- `-d, --directory [directory]` specify the directory of your project
- `-c, --config [config]` path to the config file (default: "nanoforge.config.json")
- `-p, --client-port [clientPort]` specify the port of the loader (the website to load the game)
- `--game-exposure-port [gameExposurePort]` specify the port of the game exposure
- `--server-port [serverPort]` specify the port of the server

## Contributing

<<<<<<< HEAD
Please read through our [contribution guidelines][contributing] before starting a pull request. We welcome contributions of all kinds, not just code! If you're stuck for ideas, look for the [good first issue][good-first-issue] label on issues in the repository. If you have any questions about the project, feel free to ask them on [Discussions][discussions]. Before creating your own issue or pull request, always check to see if one already exists! Don't rush contributions, take your time and ensure you're doing it correctly.

## Help
Expand All @@ -107,6 +106,5 @@ If you don't understand something in the documentation, you are experiencing pro
[cli-source]: https://github.com/NanoForge-dev/CLI
[github-releases]: https://github.com/NanoForge-dev/CLI/releases
[good-first-issue]: https://github.com/NanoForge-dev/CLI/contribute
=======

The config file schema can be found at : [https://nanoforge-dev.github.io/docs/cli/config-schema.json](https://nanoforge-dev.github.io/docs/cli/config-schema.json)
>>>>>>> 210277f (docs: finish setup auto docs)
4 changes: 4 additions & 0 deletions docs/.gh-include
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
config.schema.json
server-config.schema.json
client-config.schema.json
build-config.schema.json
run-config.schema.json
17 changes: 17 additions & 0 deletions docs/build-config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nanoforge-dev.github.io/docs/cli/build-config.schema.json",
"title": "Nanoforge CLI build config",
"type": "object",
"properties": {
"entryFile": {
"type": "string",
"description": "the entry file for the program"
},
"outDir": {
"type": "string",
"description": "the directory where to put the built files"
},
},
"required": ["entryFile", "outDir"]
}
22 changes: 22 additions & 0 deletions docs/client-config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nanoforge-dev.github.io/docs/cli/client-config.schema.json",
"title": "Nanoforge CLI client config",
"type": "object",
"properties": {
"port": {
"type": "string",
"description": "the port to use"
},
"gameExposurePort": {
"type": "string"
},
"build": {
"$ref": "https://nanoforge-dev.github.io/docs/cli/build-config.schema.json"
},
"runtime": {
"$ref": "https://nanoforge-dev.github.io/docs/cli/run-config.schema.json"
}
},
"required": ["port", "gameExposurePort", "build", "runtime"]
}
9 changes: 8 additions & 1 deletion docs/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
},
"initFunctions": {
"type": "boolean"
},
"client": {
"$ref": "https://nanoforge-dev.github.io/docs/cli/client-config.schema.json"
},
"server": {
"$ref": "https://nanoforge-dev.github.io/docs/cli/server-config.schema.json"
}
}
},
"required": ["name", "language", "initFunctions", "client", "server"]
}
13 changes: 13 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
CLI
===

.. toctree::
:maxdepth: 2

usage.rst

The nanoforge cli is the main tool to use when building or deploying a nanoforge application

To install the Nanoforge CLI use :

.. code-block:: bash

npm install -g @nanoforge-dev/cli

For usage information see :doc:`usage`
13 changes: 13 additions & 0 deletions docs/run-config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nanoforge-dev.github.io/docs/cli/run-config.schema.json",
"title": "Nanoforge CLI run config",
"type": "object",
"properties": {
"dir": {
"type": "string",
"description": "the directory to use"
},
},
"required": ["dir"]
}
22 changes: 22 additions & 0 deletions docs/server-config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nanoforge-dev.github.io/docs/cli/server-config.schema.json",
"title": "Nanoforge CLI config",
"type": "object",
"properties": {
"port": {
"type": "string",
"description": "the port to use"
},
"enable": {
"type": "boolean"
},
"build": {
"$ref": "https://nanoforge-dev.github.io/docs/cli/build-config.schema.json"
},
"runtime": {
"$ref": "https://nanoforge-dev.github.io/docs/cli/run-config.schema.json"
}
},
"required": ["port", "enable", "build", "runtime"]
}
87 changes: 87 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Usage
=====

Creating a new project
----------------------

In order to create a new project you need to use:

.. code-block:: bash

nf new

Commands
--------

Multiple commands exists to the cli:

* :ref:`build`
* :ref:`generate`
* :ref:`install_add`
* :ref:`new`
* :ref:`start`

.. _build:

build
^^^^^

Used to build your nanoforge project.

* ``-d, --directory [directory]`` specify the directory of the nanoforge project to build.
* ``-c, --config [config]`` path to the config file. (`Schema <https://nanoforge-dev.github.io/docs/cli/config.schema.json>`__)
* ``--client-outDir [clientDirectory]`` specifies the client directory.
* ``--server-outDir [serverDirectory]`` specifies the server directory.

.. _generate:

generate
^^^^^^^^

Used to generate nanoforge project files from config

* ``-d, --directory [directory]`` specify the directory of the nanoforge project to build.
* ``-c, --config [config]`` path to the config file. (`Schema <https://nanoforge-dev.github.io/docs/cli/config.schema.json>`__)

.. _install_add:

install/add
^^^^^^^^^^^

Used to add a nanoforge library to your project

* ``-d, --directory [directory]`` specify the directory of the nanoforge project to build.

.. _new:

new
^^^

Used to create a new nanoforge project

* ``-d, --directory [directory]`` specify the directory of your project
* ``--name [name]`` specify the name of your project
* ``--path [path]`` specify the path of your project
* ``--package-manager [packageManager]`` specify the package manager of your project
* ``--language [language]`` specify the language of your project
* ``--strict`` use strict mode
* ``--no-strict`` do not use strict mode
* ``--server`` create a server
* ``--no-server`` do not create a server
* ``--init-functions`` initialize functions
* ``--no-init-functions`` do not initialize functions
* ``--skip-install`` skip installing dependencies
* ``--no-skip-install`` do not skip installing dependencies

.. _start:

start
^^^^^

Used to start your nanoforge project

* ``-d, --directory [directory]`` specify the directory of your project
* ``-c, --config [config]`` path to the config file (default: "nanoforge.config.json") (`Schema <https://nanoforge-dev.github.io/docs/cli/config.schema.json>`__)
* ``-p, --client-port [clientPort]`` specify the port of the loader (the website to load the game)
* ``--game-exposure-port [gameExposurePort]`` specify the port of the game exposure
* ``--server-port [serverPort]`` specify the port of the server
Loading