From b5abd12fb012509a85a10368ea482224e80dc6ce Mon Sep 17 00:00:00 2001 From: Miralem Drek Date: Tue, 9 Jun 2020 10:38:39 +0200 Subject: [PATCH] docs: update command docs (#447) --- commands/build/README.md | 15 +++++++++------ commands/build/command.js | 2 +- commands/cli/README.md | 7 +++++-- commands/create/README.md | 17 ++++++++++++++++- commands/create/command.js | 2 +- commands/sense/README.md | 1 - commands/sense/command.js | 1 + commands/serve/README.md | 28 ++++++++++++++++++---------- 8 files changed, 51 insertions(+), 22 deletions(-) diff --git a/commands/build/README.md b/commands/build/README.md index acbbe2556..67a1abb09 100644 --- a/commands/build/README.md +++ b/commands/build/README.md @@ -1,9 +1,11 @@ # @nebula.js/cli-build +Build nebula.js visualization. + ## Install ```sh -npm install @nebula.js/cli +npm install @nebula.js/cli @nebula.js/cli-build -g ``` ## Usage @@ -11,11 +13,12 @@ npm install @nebula.js/cli ```sh nebula build -Build supernova +Build nebula.js visualization Options: - --version Show version number [boolean] - --watch, -w [boolean] [default: false] - --sourcemap, -m [boolean] [default: true] - -h, --help Show help [boolean] + --version Show version number [boolean] + --config, -c Path to JSON config file + [string] [default: "nebula.config.js"] + --watch, -w Watch source files [boolean] [default: false] + --sourcemap, -m Generate source map [boolean] [default: true] ``` diff --git a/commands/build/command.js b/commands/build/command.js index 13233d20a..60a07db98 100644 --- a/commands/build/command.js +++ b/commands/build/command.js @@ -4,7 +4,7 @@ const init = require('./lib/init-config'); module.exports = { command: 'build', - desc: 'Build supernova', + desc: 'Build visualization', builder(yargs) { init(yargs).argv; }, diff --git a/commands/cli/README.md b/commands/cli/README.md index f0e7f6f65..c0a4ee1fe 100644 --- a/commands/cli/README.md +++ b/commands/cli/README.md @@ -1,5 +1,7 @@ # @nebula.js/cli +Command line interface for nebula.js + ## Install ```sh @@ -12,9 +14,10 @@ npm install -g @nebula.js/cli nebula [options] Commands: - nebula build Build supernova - nebula create Create a supernova + nebula build Build visualization + nebula create Create a visualization nebula serve Dev server + nebula sense Build a nebula visualization as a Qlik Sense extension Options: --version Show version number [boolean] diff --git a/commands/create/README.md b/commands/create/README.md index ad698b3d2..c869c9897 100644 --- a/commands/create/README.md +++ b/commands/create/README.md @@ -1,5 +1,7 @@ # @nebula.js/cli-create +Scaffold a nebula visualization or mashup. + ## Install ```sh @@ -13,7 +15,10 @@ npm install -g @nebula.js/cli ```sh nebula create -Create a supernova +Create a visualization + +Commands: + nebula create mashup Create a mashup Positionals: name name of the project [string] [required] @@ -22,11 +27,21 @@ Options: --version Show version number [boolean] --install Run package installation step [boolean] [default: true] --pkgm Package manager [string] [choices: "npm", "yarn"] + --picasso Picasso template [string] [choices: "none", "minimal", "barchart"] + --author Package author [string] -h, --help Show help [boolean] ``` #### Example +**Create a visualization** + ```sh nebula create hello-sunshine ``` + +**Create a mashup** + +```sh +nebula create mashup hello-mashie +``` diff --git a/commands/create/command.js b/commands/create/command.js index 2dd77eea8..d00a53d23 100644 --- a/commands/create/command.js +++ b/commands/create/command.js @@ -16,7 +16,7 @@ const mashup = { module.exports = { command: 'create ', - desc: 'Create a supernova', + desc: 'Create a visualization', builder(yargs) { yargs.command(mashup); diff --git a/commands/sense/README.md b/commands/sense/README.md index 03927e3e6..e45399d93 100644 --- a/commands/sense/README.md +++ b/commands/sense/README.md @@ -22,7 +22,6 @@ Options: --output Destination directory [string] [default: "-ext"] --minify Minify and uglify code [boolean] [default: true] --sourcemap Generate sourcemaps [boolean] [default: false] - --partial Generate partial extension [boolean] [default: false] -h, --help Show help [boolean] ``` diff --git a/commands/sense/command.js b/commands/sense/command.js index 90aa1aaef..644b100df 100644 --- a/commands/sense/command.js +++ b/commands/sense/command.js @@ -38,6 +38,7 @@ module.exports = { required: false, default: false, desc: 'Generate partial extension', + hidden: true, }); }, handler(argv) { diff --git a/commands/serve/README.md b/commands/serve/README.md index e220266bb..b9e403a95 100644 --- a/commands/serve/README.md +++ b/commands/serve/README.md @@ -1,11 +1,11 @@ # @nebula.js/cli-serve -Basic web development server for supernovas. +Basic web development server for nebula.js visualizations. ## Install ```sh -npm install @nebula.js/cli -g +npm install @nebula.js/cli @nebula.js/cli-serve -g ``` ## Usage @@ -18,16 +18,24 @@ nebula serve -h Dev server Options: - --version Show version number [boolean] - --entry File entrypoint [string] - --type Generic object type [string] + --version Show version number [boolean] + --config, -c Path to JSON config file + [string] [default: "nebula.config.js"] + --entry File entrypoint [string] + --type Generic object type [string] --build [boolean] [default: true] - --host [string] + --host [string] [default: "localhost"] --port [number] - --enigma.host [string] - --enigma.port [default: 9076] - --ACCEPT_EULA, -a [boolean] [default: false] - -h, --help Show help [boolean] + --disableHostCheck [boolean] [default: false] + --resources Path to a folder that will be served as static files under + /resources [string] + --scripts Array of scripts to inject [array] + --stylesheets Array of stylesheets to inject [array] + --enigma.host [string] [default: "localhost"] + --enigma.port [number] [default: 9076] + --webIntegrationId [string] + --ACCEPT_EULA [boolean] [default: false] + -h, --help Show help [boolean] ``` #### Example