Created
October 12, 2011 08:56
-
-
Save gijs/1280696 to your computer and use it in GitHub Desktop.
Projectwatch-buildout for SCSS and CoffeeScript compilation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage:: | |
# | |
# bin/buildout -c watchout.cfg | |
# source bin/activate | |
# projectwatch src/my.project | |
# deactivate | |
# | |
# See also: https://github.com/epeli/Projectwatch | |
[buildout] | |
parts = | |
nodejs | |
nodejs-bin | |
activate | |
npm | |
npm-bin | |
coffee | |
coffee-bin | |
scss | |
scss-bin | |
projectwatch | |
projectwatch-bin | |
[nodejs] | |
# install nodejs | |
recipe=zc.recipe.cmmi | |
url=http://nodejs.org/dist/node-v0.4.8.tar.gz | |
[nodejs-bin] | |
# link the nodejs binaries | |
recipe=cns.recipe.symlink | |
symlink = | |
node | |
node-waf | |
symlink_base = ${buildout:parts-directory}/nodejs/bin/ | |
symlink_target = ${buildout:bin-directory} | |
[activate] | |
# prioritize ${buildout:bin-directory} in environment variables | |
recipe=evg.recipe.activate | |
[npm] | |
# install node package manager | |
recipe=collective.recipe.cmd | |
on_install=true | |
on_update=false | |
cmds= | |
source ${buildout:bin-directory}/activate | |
curl http://npmjs.org/install.sh | clean=yes sh | |
uninstall_cmds= | |
${buildout:bin-directory}/npm uninstall npm -g | |
[npm-bin] | |
# fix npm binaries to use node from ${buildout:bin-directory} | |
recipe=collective.recipe.cmd | |
on_install=true | |
on_update=true | |
cmds= | |
rm ${buildout:bin-directory}/npm* | |
for f in `grep '#!' ${buildout:directory}/lib/node_modules/npm/bin/* -l`;do | |
sed -i 's|/usr/bin/env node|${buildout:bin-directory}/node|' $f | |
done | |
ln -s ${buildout:directory}/lib/node_modules/npm/bin/npm.js ${buildout:bin-directory}/npm | |
[coffee] | |
# install coffee-script | |
recipe=collective.recipe.cmd | |
on_install=true | |
on_update=false | |
cmds= | |
${buildout:bin-directory}/npm -g install coffee-script | |
uninstall_cmds= | |
${buildout:bin-directory}/npm -g uninstall coffee-script | |
[coffee-bin] | |
# link the coffee-script binaries | |
recipe=cns.recipe.symlink | |
symlink = | |
coffee | |
symlink_base = ${buildout:directory}/lib/node_modules/coffee-script/bin/ | |
symlink_target = ${buildout:bin-directory} | |
[scss] | |
recipe = zc.recipe.egg:eggs | |
eggs = PySCSS | |
[scss-bin] | |
# link the scss binaries | |
recipe=collective.recipe.cmd | |
on_install=true | |
on_update=false | |
cmds= | |
ln -s ${buildout:eggs-directory}/pyScss*/scss/__init__.py ${buildout:bin-directory}/scss | |
chmod u+x ${buildout:bin-directory}/scss | |
uninstall_cmds== | |
rm ${buildout:bin-directory}/scss | |
[projectwatch] | |
# install projectwatch | |
recipe=collective.recipe.cmd | |
on_install=true | |
on_update=false | |
cmds= | |
${buildout:bin-directory}/npm -g install projectwatch | |
uninstall_cmds= | |
${buildout:bin-directory}/npm -g uninstall projectwatch | |
[projectwatch-bin] | |
# link the projectwatch binaries | |
recipe=cns.recipe.symlink | |
symlink = | |
projectwatch | |
symlink_base = ${buildout:directory}/lib/node_modules/coffee-script/bin/ | |
symlink_target = ${buildout:bin-directory} | |
# This buildout was inspired by: | |
# https://dev.inigo-tech.com/svn/izhar/buildouts/buildout-extends/coffee-buildout.cfg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment