Watch and compile jade, stylus, coffee-script files
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Preprocessors manager

Watch and compile jade, stylus, coffee-script files

  • Features
    • Watch files by pattern and compile on changes, also support copy
    • Compiling files in batch mode
    • Source and destination directories
    • Default project config
    • Direct options to jade and coffee-script
    • Included nib css3 extension for stylus
    • Built-in static server
    • Livereload (alpha)

Build Status Dependency Status NPM version


linux users

sudo npm install -g jastyco

mac os x users (brew)

npm install -g jastyco


Create files

mkdir src
touch src/index.jade
touch src/styles.styl
touch src/


jastyco --src src --dest dest

On modification src files will put compiled files to dest directory

changed src/index.jade to dest/index.html
changed src/styles.styl to dest/styles.css
changed src/ to dest/js.js

Also support default config file
Create jastyco.json in root project

  "src": "src",
  "dest": "dest"

And you can run simply


To compile files in batch mode, run:

jastyco -b


jastyco --help

Usage: jastyco [options] patterns


  -h, --help                 output usage information
  -V, --version              output the version number
  -b, --build                compile sources in batch mode. "false" default
  -s, --src <src>            source directory. current default
  -d, --dest <dest>          destination directory. current default
  -p, --patterns <patterns>  files compile by patterns. "**/*.jade **/*.coffee **/*.styl" default
  -C, --copy <patterns>      copy files on change by patterns
  -c, --config <config>      config file. "jastyco.json" default
  -X, --delete               delete dest file on delete source file. "false" default
  --jade <jade>              jade options. {"pretty":true} default
  --coffee <coffee>          coffee options. {"bare":true} default
  --styl <styl>              stylus options. {"compress":false,"nib":true} default
  --static <static>          static server options. {"port":8050} default
  --livereload <livereload>  livereload options. {"host":"localhost","port":8070,"css":true,"js":true,"html":true,"staticDest":null} default
  • jade and coffee options pass to compiler
  • stylus option nib for enable extension, compress for uglify
    for use nib in .styl needs import
@import 'nib'
  • copy useful for frameworks which had self compile,
    for example express use jade as template engine
    or already css, js, fonts...

  • for disable static or livereload use false value

    static: false,
    livereload: false
  • livereoad - support css, js, html (inspired by
    works in watch mode only, by auto inject 2 script into static html
    for manual include scripts with src
    //{livereload-host}:{livereload-port}/ and
    //{livereload-host}:{livereload-port}/ where livereload-host, livereload-port taken from config

Override options via cli, example:

jastyco --jade "pretty:false" --coffee "bare:false" --styl="nib:false" --static "post:8088" --livereload "false"

Config jastyco.json example:

  "src": "src",
  "dest": "dest",
  "patterns": "**/*.coffee **/*.styl",
  "copy": "**/*.jade **/*.css **/*.eot **/*.svg **/*.ttf **/*.woff",
  "jade": {
    "pretty": true
  "coffee": {
    "bare": true
  "styl": {
    "compress": false,
    "nib": true
  "delete": true,
  "static": {
    "port": 8088
  livereload: false

Change log

Known issues

  • not watch for new directories. required relaunch jastyco