JSPM

  • Created
  • Published
  • Downloads 45
  • Score
    100M100P100Q68490F
  • License SEE LICENSE IN LICENSE.txt

A functional style, but highly readable language that compiles to JavaScript.

Package Exports

  • futurescript/bin/fus.mjs

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

Please visit https://futurescript.org/ to learn the language.

Requirements

  1. Node.js 10 or higher
  2. npm 5.6.0 or higher

Command Usage

npm install futurescript -g --unsafe-perm

IMPORTANT: If you're using -g or --global, then --unsafe-perm must be selected.

The generated JS works on any JS environment that supports ECMAScript 2017, including browser and Node.js.

fus (compile | c) [--map] <file-or-directory> [<target-file-or-directory>]

fus (legacy-compile | lc) [--map] <file-or-directory> [<target-file-or-directory>]

fus (version | v | --version)

fus --help

To compile (to .mjs), use compile or c.

To compile (to .js), use legacy-compile or lc.

Those two are exactly the same except for the file extension.

--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.mjs":

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 history.

License

See "LICENSE.txt".