I put together a mobile development stack that is almost entirely using Javascript on node.js. With the only exception of SASS (prefer it to LESS) and Fabric. I prefer not to pollute my development directory and as I have to combine and minify JS and CSS anyway, I thought I could also use node.js to serve my code.
I would like to reduce my dependence on Ruby and/or Python. I don’t really use all features of Fabric so I have the hope of replacing it. But I couldn’t find any similar tool written in Javascript.
All I need is to:
- Pull from git repository.
- Install depencies locally.
- Minify and combine JS/CSS invoking require.js/SASS.
- Run testsuite.
- Serve the code via node.js for hands-on or testing with Ripple.
Fabric might already be overkill, I only use it for my Python web projects because the necessary servers don’t run on my machine, but that wouldn’t be the case here. What would be the best way to handle this without Fabric?
I’ve been pondering the same question myself.
The most promising direct candidate I’ve found so far is launch (https://github.com/bengourley/launch). However, it hasn’t been updated in like a year, which makes me a little suspicious about its future status.
In the absense of obviously good solutions, I ended up solving the whole build/deployment problem, piece by piece in the following fashion:
After some trial and error, I removednode_modulesfrom.gitignore. One of the implications is that you don’t have to install dependencies locally, removing the second step (try if reading this convinces you as well).node_modulesin.gitignore. Just make surepackage.jsonstays up-to-date (for tips, see “Managing Node.js Dependencies with Shrinkwrap”)I’m lazy and just now I’m adding the minified stuff into git (hopefully I will change this at some point).gruntwhen deploying to do the minificationBy doing so, I effectively eliminated some of the need for Fabric altogether, leaving only the actual deployment to be solved:
That being said, I too would be glad to hear about better solutions.
Edit: just found out about deploy (https://github.com/visionmedia/deploy). Seems very promising. You could try that as well!