Skip to content

Instantly share code, notes, and snippets.

@STRd6
Created November 29, 2013 16:56
Show Gist options
  • Save STRd6/7708687 to your computer and use it in GitHub Desktop.
Save STRd6/7708687 to your computer and use it in GitHub Desktop.
Best way to compile to JS for CoffeeScript NPM packages. `prepublish` should actually be `script/prepublish` but gist doesn't allow for directories :\
...
"devDependencies": {
"coffee-script": "~1.6.3"
},
"files": [
"dist"
],
"scripts": {
"prepublish": "prepublish"
},
"main": "dist/index.js"
#!/bin/bash
set -e
./node_modules/.bin/coffee -co dist/ src/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment