A web asset precompiling file system proxy.
Switch branches/tags
15_doesnt_serve_error_stylesheet appveyor greenkeeper-babel-core-6.10.4 greenkeeper-babel-core-6.11.4 greenkeeper-babel-core-6.13.0 greenkeeper-babel-core-6.13.1 greenkeeper-babel-core-6.13.2 greenkeeper-babel-core-6.14.0 greenkeeper-babel-core-6.16.0 greenkeeper-babel-core-6.17.0 greenkeeper-babel-core-6.18.0 greenkeeper-babel-core-6.18.1 greenkeeper-babel-core-6.18.2 greenkeeper-babel-core-6.20.0 greenkeeper-babel-core-6.21.0 greenkeeper-babel-core-6.22.0 greenkeeper-babel-core-6.22.1 greenkeeper-babel-core-6.23.0 greenkeeper-babel-core-6.23.1 greenkeeper-babel-core-6.24.0 greenkeeper-babel-core-6.24.1 greenkeeper-babel-preset-es2015-6.13.0 greenkeeper-babel-preset-es2015-6.13.1 greenkeeper-babel-preset-es2015-6.13.2 greenkeeper-babel-preset-es2015-6.14.0 greenkeeper-babel-preset-es2015-6.16.0 greenkeeper-babel-preset-es2015-6.18.0 greenkeeper-babel-preset-es2015-6.22.0 greenkeeper-babel-preset-es2015-6.24.0 greenkeeper-babel-preset-es2015-6.24.1 greenkeeper-coffee-script-1.11.0 greenkeeper-coffee-script-1.11.1 greenkeeper-coffee-script-1.12.0 greenkeeper-coffee-script-1.12.1 greenkeeper-coffee-script-1.12.3 greenkeeper-coffee-script-1.12.4 greenkeeper-coffee-script-1.12.5 greenkeeper-coffee-script-1.12.6 greenkeeper-coveralls-2.11.10 greenkeeper-coveralls-2.11.11 greenkeeper-coveralls-2.11.12 greenkeeper-coveralls-2.11.13 greenkeeper-coveralls-2.11.14 greenkeeper-coveralls-2.11.15 greenkeeper-coveralls-2.11.16 greenkeeper-coveralls-2.13.0 greenkeeper-coveralls-2.13.1 greenkeeper-fuse-bindings-2.9.0 greenkeeper-fuse-bindings-2.10.0 greenkeeper-fuse-bindings-2.10.1 greenkeeper-fuse-bindings-2.11.1 greenkeeper-gaze-1.1.0 greenkeeper-gaze-1.1.1 greenkeeper-gaze-1.1.2 greenkeeper-istanbul-0.4.4 greenkeeper-istanbul-0.4.5 greenkeeper-jshint-2.9.3 greenkeeper-jshint-2.9.4 greenkeeper-less-2.7.2 greenkeeper-marked-0.3.6 greenkeeper-minimatch-3.0.3 greenkeeper-minimatch-3.0.4 greenkeeper-mocha-3.0.0 greenkeeper-mocha-3.0.1 greenkeeper-mocha-3.0.2 greenkeeper-mocha-3.1.0 greenkeeper-mocha-3.1.1 greenkeeper-mocha-3.1.2 greenkeeper-mocha-3.2.0 greenkeeper-mocha-3.3.0 greenkeeper-mocha-3.4.0 greenkeeper-mocha-3.4.1 greenkeeper-mocha-3.4.2 greenkeeper-mocha-lcov-reporter-1.3.0 greenkeeper-node-sass-3.9.1 greenkeeper-node-sass-3.9.2 greenkeeper-node-sass-3.9.3 greenkeeper-node-sass-3.10.0 greenkeeper-node-sass-3.10.1 greenkeeper-node-sass-3.11.0 greenkeeper-node-sass-3.11.1 greenkeeper-node-sass-3.11.2 greenkeeper-node-sass-3.11.3 greenkeeper-node-sass-3.12.0 greenkeeper-node-sass-3.12.1 greenkeeper-node-sass-3.12.3 greenkeeper-node-sass-3.12.5 greenkeeper-node-sass-3.13.0 greenkeeper-node-sass-3.13.1 greenkeeper-node-sass-4.0.0 greenkeeper-node-sass-4.1.0 greenkeeper-node-sass-4.1.1 greenkeeper-node-sass-4.2.0 greenkeeper-node-sass-4.3.0 greenkeeper-node-sass-4.4.0 greenkeeper-node-sass-4.5.0 greenkeeper-node-sass-4.5.1 greenkeeper-node-sass-4.5.2 greenkeeper-node-sass-4.5.3 greenkeeper-rimraf-2.5.3 greenkeeper-rimraf-2.5.4 greenkeeper-rimraf-2.6.0 greenkeeper-rimraf-2.6.1 greenkeeper-sinon-1.17.5 greenkeeper-sinon-1.17.6 greenkeeper-sinon-1.17.7 greenkeeper-sinon-2.0.0 greenkeeper-sinon-2.1.0 greenkeeper-sinon-2.2.0 greenkeeper-sinon-2.3.0 greenkeeper-sinon-2.3.1 greenkeeper-sinon-2.3.2 greenkeeper-unexpected-10.14.0 greenkeeper-unexpected-10.14.1 greenkeeper-unexpected-10.14.2 greenkeeper-unexpected-10.15.0 greenkeeper-unexpected-10.15.1 greenkeeper-unexpected-10.16.0 greenkeeper-unexpected-10.17.0 greenkeeper-unexpected-10.18.0 greenkeeper-unexpected-10.18.1 greenkeeper-unexpected-10.19.0 greenkeeper-unexpected-10.20.0 greenkeeper-unexpected-10.21.0 greenkeeper-unexpected-10.21.1 greenkeeper-unexpected-10.22.0 greenkeeper-unexpected-10.22.1 greenkeeper-unexpected-10.22.2 greenkeeper-unexpected-10.23.0 greenkeeper-unexpected-10.25.0 greenkeeper-unexpected-10.26.0 greenkeeper-unexpected-10.26.1 greenkeeper-unexpected-10.26.2 greenkeeper-unexpected-10.26.3 greenkeeper-unexpected-10.27.0 greenkeeper-unexpected-10.28.0 greenkeeper-unexpected-10.29.0 greenkeeper-unexpected-sinon-10.3.0 greenkeeper-unexpected-sinon-10.4.0 greenkeeper-unexpected-sinon-10.5.0 greenkeeper-unexpected-sinon-10.5.1 greenkeeper-unexpected-sinon-10.6.0 greenkeeper-unexpected-sinon-10.6.1 greenkeeper-unexpected-sinon-10.7.0 greenkeeper-unexpected-sinon-10.7.1 greenkeeper-when-3.7.8 greenkeeper/remove-node-0.10 master
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
fixtures
lib
test
.babelrc
.coveralls.yml
.editorconfig
.gitignore
.jshintignore
.jshintrc
.travis.yml
README.md
package.json
runtest.js

README.md

fusile

NPM Version Linux Build Test Coverage Dependency Status devDependency Status Join the chat

A web asset precompiling file system proxy. See the JSConf.eu talk: Transpiling Recomposed

Mounts a fuse file system on a target directory, auto loads available compilers, compiles assets on request, caches compiled assets if source file is unmodified, watches original file for changes on demand.

Turn your setup of custom configured transpiler plugins for all your different tools from this:

+---------------+
| Source.es6.js |  -+--> Transpiler --> Module loader --> Browser
+---------------+   |
                    +--> Watcher --> Transpiler --> Livereload
                    |
                    +--> Transpiler --> Linter
                    |
                    +--> Transpiler --> Test runner
                    |
                    +--> Transpiler --> Build system

into this:

+---------------+      +--------------------------+
| Source.es6.js |  --> | Source.transpiled.es6.js | -+--> Module loader --> Browser
+---------------+      +--------------------------+  |
                                                     +--> Watcher --> Livereload
                                                     |
                                                     +--> Linter
                                                     |
                                                     +--> Test runner
                                                     |
                                                     +--> Build system

Installation

Prerequisites: Fuse

npm install -g fusile

Usage

General usage: fusile <sourceDir> <mountPoint>

Fusile is a compiling file system proxy. In order to get it to compile your assets you need to install one or more of these precompilers: LiveScript, babel-core, coco, coffee-script, dogescript, less, marked, myth, node-sass, stylus, swig

When any of the above precompilers are available in the context of fusile (in your project root or globally installed), fusile will automatically load it and start compiling files with the corresponding file extension when you read the files from the mountpoint.

Once you've mounted the new transpiled source directory, point your browser, web server, linter, test runner directly at the files in it, and you are ready to go.

Project status

Status: Fairly well tested. Need real world exposure. Feedback appreciated!

Roadmap

v1.x

  • Autoload installed transpilers
  • Asset compiling on demand
  • Intelligent caching of compiled assets
  • File watcher based cache busting (optional)
  • Autoprefixer
  • Sourcemaps
  • Compiled file extension rewriting to target extension
  • Isolate Accord transpiler autoloading into separate module

v2.x

  • Expose a compile lifecycle callback to let people hook in their own pipeline
  • Configuration: Options for individual transpiler
  • Configuration: File extension / glob pattern to transpiler mapping
  • Detect compiled dir file watcher init events and proxy them through to source dir

v3.x

  • Refactoring and documentation
  • Stability research and improvements
  • Performance research and improvements

File watching

General usage: fusile <sourceDir> <mountPoint> --watch "**/*.jsx" --watch "**/*.less" -w "**/*.stylus" -w "**/*.scss"

You can add file watches to files in the Fusile mountpoint. Because Fusile can't yet pick up your file watchin events you will need to specify glob patterns like above, which will set up file watchers on the matching patterns.

File watchers will be set up per individual file, and only at the time when you open a file for reading. This should ensure a miniumum amount of inode watches, and a minimum amount of recompiles.

Note that watcher glob patterns are quoted to avoid shell expansion of the glob patterns at execution time.

License

MIT