0.1.12 • Published 7 years ago
nodescript v0.1.12
"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint-Exupery
NodeScript is a JavaScript dialect for perfectionists with deadlines.
Differences with JavaScript:
- Semicolons. Semicolons are automatically inserted even when the next line starts with (, [, or ,`
- Variable declarations.
let
-declarations are automatically inserted for non-declared variables - Strict mode.
"use strict"
is automatically inserted in files - JSX. JSX is supported out of the box
- Static typing. (Under consideration) Static typing is supported via Flow.
- Node API. (Under consideration) Node's API is automatically promisified.
Installation
$ npm install -g nodescript
Usage
$ nodescript [options] [input] [arguments]
Options
-b, --bundle bundle directory
-c, --compile compile file/directory
-o, --output[=stdout] define output file/directory
-w, --watch watch file/directory for changes
-h, --help print this help message
-v, --version print version number
# Examples:
$ nodescript # open REPL
$ nodescript "code" # run code
$ nodescript script.ns # run script
$ nodescript --compile "code"
$ nodescript --compile script.ns
$ nodescript --compile script.ns --output script.js
$ nodescript --compile --watch script.ns --output script.js
$ nodescript --compile --watch src/ --output lib/
$ nodescript --compile --bundle src/ --output bundle.js
$ nodescript --compile --bundle --watch src/ --output bundle.js
Examples
commander.js/index.ns
chokidar/lib/nodefs-handler.ns
chokidar/example.ns
Supported Operating Systems
- Linux
- macOS
Support
Support on Patreon.