Serve up static files piping them through scripts like a boss.
Lately it has become increasingly popular using
npm scripts over task runners such as grunt or gulp. So why not put those same scripts to work serving you fresh compiled assets for every request? That is just what zulu does; fire up a static file server piping select routes through your already defined scripts.
NOTICE: Still missing thorough testing, not recommended for usage just yet.
$ npm install --save-dev zulu
Zulu is best incorporated into your package.json under
scripts as so:
npm start will serve all files in the folder
public (as is) as well as pipe requests for
/main.js through browserify and requests for
/main.css through postcss giving you compiled assets on demand. Though zulu is not restricted to only npm scripts, you can run any command when piping requests.
# Just serve static files in current dir$ zulu
# Compile SASS source files to CSS$ zulu '**/*.scss' -s 'sassc --stdin --sourcemap'
# Render markdown files to HTML$ zulu '**/*.md' -s 'multimarkdown --full'
--port, -pServer port
--route, rCreate a route for path (relative to parent path)
--script, -sPipe associated route through script (zero or more per route)
--help, -hShow help information
- Handle multiple paths per route
- Speed (constant running processes?)
- Support POST
- Add caching mechanism