Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

On npm install or publish, compile coffeescript files in to lib/ (if …

…src/ exists).

Don't publish coffescripts files (src/).
When publishing, compile coffeescripts files.
When installing from published package will not compile coffeescript, as src/ directory will not be present (as it is present in .npmignore).
When installing from github (or other non-published source) coffeescript will be compiled.

This should, hopefully satisfy everyone and everything. Installing a published package will have no dependency on coffeescript. Installing from github (either a user application or travis-ci) will compile coffeescript files in to lib/

Issue #23
  • Loading branch information...
commit 2a733254f2240963839709a97527012c1ff974ad 1 parent 8e5847e
@pekim authored
View
1  .npmignore
@@ -1,3 +1,4 @@
+src/
todo
.git*
.project
View
3  package.json
@@ -35,6 +35,7 @@
},
"scripts": {
"test": "scripts/tests-unit",
- "postinstall": "scripts/build"
+ "postinstall": "scripts/build",
+ "publish": "scripts/build"
}
}
View
10 scripts/build
@@ -1,8 +1,6 @@
#!/bin/sh
-npm install coffee-script@1.3.1
-
-rm -fr lib/
-node_modules/.bin/coffee -b -c -o lib/ src/
-
-npm uninstall coffee-script
+if [ -d "src/" ]; then
+ rm -fr lib/
+ node_modules/.bin/coffee -b -c -o lib/ src/
+fi
View
3  scripts/compile-coffee
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-node_modules/.bin/coffee -b -w -o coffee .
Please sign in to comment.
Something went wrong with that request. Please try again.