asset middleware to retrieve asset files created by a makefile command
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

Asset middleware

Decrease dev/testing period rebuilding on demand assets (with make commands) which has been updated.

Each time a GET request for an asset ( specified on the monitor options ) is received:

  • the make command for the specific asset ( convention naming ) is executed, and after the execution the asset is retrieved.
  • On production, make commands are not executed and only retrieves the specific asset.

Set up express server

  app.use( require('node-make-asset-pipeline')({asset: 'assets', monitors: [ { name: 'ember', watch: 'packages/ember.js/packages' } ]}) );

Create makefile

In order to work, each command must output a file with the same name as the command

Makefile

ember:

cd ./packages/ember.js; \
  rake clean; \
  rake 

cp -pr ./packages/ember.js/dist/ember.js assets/ember.js

asset_folder

ember.js

Install

npm node-make-asset-pipeline