Skip to content
npm packages in CoffeeScript - ( -> (package.json)
CoffeeScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

________________  ___________/_/____________
_  ___/  __ \  / / /_  ___/_  /_  _ \_  ___/
/ /__ / /_/ / /_/ /_  /   _  / /  __/  /    
\___/ \____/\____/ /_/    /_/  \___//_/     

npm packages in CoffeeScript ( -> package.json)


npm -g install courier


Compiling a file to a package.json isn't as simple as it seems


  1. Write your npm package package.json in CoffeeScript and save as
  2. Run courier against your project.

package.json is now alongside; ready to be installed or linked with npm.


Use the -p (--print) flag for a noisy delivery.


Since courier utilises CoffeeScript and not static JSON, npm packages can be made dynamic.

For instance, the following

name: 'node-foo'

description: 'extends node with foo'

date: new Date

...would produce the following package.json...

  "name": "node-foo",
  "description": "extends node with foo",
  "date": "2011-02-23T09:25:14.491Z"

For a concrete example of this behaviour, look no further than the of this very project. Hint: The VERSION file is read to dynamically version the npm package.

Something went wrong with that request. Please try again.