From cefa9942fa745ebf48858857b8f7c828c7004f59 Mon Sep 17 00:00:00 2001 From: James Robert Date: Mon, 19 Mar 2012 14:17:45 -0300 Subject: [PATCH] Update Readme.md --- Readme.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index f8fe29e47..555675302 100644 --- a/Readme.md +++ b/Readme.md @@ -1,9 +1,35 @@ -Heroku buildpack: Python +Unofficial Heroku buildpack: Python + npm dependency resolution ======================== This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Python apps. It uses [virtualenv](http://www.virtualenv.org/) and [pip](http://www.pip-installer.org/). +Differences +----------- + +The main difference from the official Python buildpack is support for node dependencies via [npm](http://npmjs.org). + +This is accomplished via an `npm_requirements.txt` which must be in the base directory (along with the `requirements.txt` file that is used by pip) + +If an `npm_requirements.txt` file is present it works similar to the way you're used to with pip. + +Each line of the file is appended to `npm install` so for example + +npm_requirements.txt: + + coffee-script + less@1.0.0 + +would result in the following commands being run to resolve the dependencies: + + $ npm install -g coffee-script + $ npm install -g less@1.0.0 + +Why install Node along with Python? +----------------------------------- + +Primarily because it's desirable to use technologies like [less-css](http://lesscss.org/) and [coffeescript](http://coffeescript.org/) on the server (with something like [django compressor](https://github.com/jezdez/django_compressor) for example) + Usage -----