CLI Reference

The nsc command-line tool compiles and manages NoShift.js projects. If installed locally, prefix commands with npx (e.g. npx nsc).

nsc

Compile all .nsjs files from rootdir to outdir as defined in nsjsconfig.json. Files with syntax errors are skipped and reported.

# Global
nsc

# Local
npx nsc

nsc watch | w | -w | --watch

Watch for file changes and recompile automatically.

# Global
nsc watch

# Local
npx nsc watch

nsc run <file> | -r <file> | --run <file>

Compile and execute a .nsjs file directly without writing output files.

# Global
nsc run src/index.nsjs

# Local
npx nsc run src/index.nsjs

nsc create [name] | --create [name]

Scaffold a new NoShift.js project. Use --no-prettier to skip Prettier setup.

# Global
nsc create my-project

# Local
npx nsc create my-project

nsc init | --init

Create a nsjsconfig.json in the current directory with default settings.

# Global
nsc init

# Local
npx nsc init

nsc clean | --clean

Delete the output directory (outdir) defined in nsjsconfig.json.

# Global
nsc clean

# Local
npx nsc clean

nsc version | -v | --version

Display the current version of noshift.js.

# Global
nsc version

# Local
npx nsc version

nsc help | -h | --help

Show help information. Includes a link to the documentation site.

# Global
nsc help

# Local
npx nsc help