A dummy Express.js application to demonstrate the usage of ASPAX - the simple Node.js asset packager.
-
Install ASPAX globally, if you don't already have it:
npm install aspax -g -
Clone this repo and go to the
serverfolder:git clone https://github.com/icflorescu/aspax-demo.git cd aspax-demo/server -
Install the necessary application modules
npm install -
Do the ASPAX magic:
# watch and build on-the-fly during development aspax -s ../client watch # build for development aspax -s ../client build # pack for production (will compile, concat, minify and fingerprint) aspax -s ../client pack # clean everything aspax -s ../client clean -
Run the demo in development or production mode to see it in action:
# development # NODE_ENV=development node start.js # ...or NODE_ENV=development nodemon -e js,json,coffee -x node # production # NODE_ENV=production node start.js
It's always a good idea to put the above commands in shell scripts (see watch-assets, pack-assets, start-dev and start-prod).
If you find this piece of software useful, please tweet about ASPAX and endorse me on LinkedIn:
