Package Exports
- futurescript/bin/fus
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (futurescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
FutureScript
Consistent. Member access always uses the dot
.
, regardless of whether it's in object or array.Simple. The
=
just means equality. Say goodbye to the annoying==
and===
.Highly expressive and readable. If you are a fan of "functional style", then you must be interested.
And many, many more.
Please visit http://futurescript.org/ to learn the language.
Command Usage
npm install -g futurescript
We recommend your Node.js version be 5.0 or higher. The CLI may work on 0.12.x or 4.x, but not tested.
fus (compile | c) [--map] <file-or-directory> [<target-file-or-directory>]
fus (version | v | --version)
To compile, use compile
or c
.
At present, you may need Babel to downgrade the generated ES6 code to be compatible with your environment. For details, see Babel website.
For example, if you want your generated JS to run on Node.js 5.x, you only need to enable these 3 Babel plugins:
- transform-es2015-modules-commonjs
- transform-es2015-destructuring
- transform-es2015-parameters
For Node.js prior to 5.0 and for browsers, you may need to enable the entire "es2015" preset.
--map
will add the line numbers of the source to the generated code. Useful for debugging. (Note: this is not "source map", which is another technology.)
Because we use a very sophisticated versioning model that all historical compilers are kept, there's really no need to install it to your project directory - conflicts are very unlikely. But if you really "hate global", to avoid waste of disk space, it should be stated in "devDependencies", not "dependencies" (particularly when you're writing a middleware).
Examples
Compile "a.fus" to "a.js":
fus compile a.fus
Compile for debugging:
fus compile --map a.fus
Compile the whole "lib" directory to "target":
fus compile lib target
Develop this project
See "develop.md".
Changelog
See "changelog.md".
License
See "LICENSE.txt".