Skip to content
Browse files

Move coffeescript to src/ and compile lib/ on publish

  • Loading branch information...
1 parent 6217117 commit 029f663c3cb0fc47a9a6531afa13f7880e1a7a40 @jnordberg committed Feb 3, 2012
View
4 bin/dev/cli
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+
+require('coffee-script');
+require('../../src/cli/').main();
View
10 bin/dev/compile_coffee
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+if [ -f ./node_modules/.bin/coffee ]; then
+ echo "Compiling CoffeScript"
+ ./node_modules/.bin/coffee -o ./lib -b -c ./src
+ exit $?
+else
+ echo "CoffeScript package missing. Run npm install --dev"
+ exit 1
+fi
View
1 bin/wintersmith
@@ -1,4 +1,3 @@
#!/usr/bin/env node
-require('coffee-script');
require('../lib/cli/').main();
View
10 package.json
@@ -14,6 +14,12 @@
"bin": {
"wintersmith": "./bin/wintersmith"
},
+ "scripts": {
+ "prepublish": "./bin/dev/compile_coffee"
+ },
+ "directories": {
+ "lib": "./lib/"
+ },
"repository": {
"type": "git",
"url": "https://github.com/jnordberg/wintersmith.git"
@@ -25,13 +31,15 @@
"jade": "0.20.x",
"ncp": "0.2.x",
"rimraf": "2.x.x",
- "coffee-script": "1.2.x",
"winston": "0.5.x",
"colors": "0.x.x",
"glob": "3.0.x",
"union": "0.1.x",
"flatiron": "0.1.x"
},
+ "devDependencies": {
+ "coffee-script": "1.2.x"
+ },
"engine": {
"node": ">=0.4"
}
View
0 lib/article.coffee → src/article.coffee
File renamed without changes.
View
0 lib/cli/build.coffee → src/cli/build.coffee
File renamed without changes.
View
0 lib/cli/common.coffee → src/cli/common.coffee
File renamed without changes.
View
0 lib/cli/index.coffee → src/cli/index.coffee
File renamed without changes.
View
0 lib/cli/new.coffee → src/cli/new.coffee
File renamed without changes.
View
0 lib/cli/preview.coffee → src/cli/preview.coffee
File renamed without changes.
View
0 lib/common.coffee → src/common.coffee
File renamed without changes.
View
0 lib/index.coffee → src/index.coffee
File renamed without changes.
View
0 lib/parser.coffee → src/parser.coffee
File renamed without changes.
View
0 lib/renderer.coffee → src/renderer.coffee
File renamed without changes.
View
0 lib/server.coffee → src/server.coffee
File renamed without changes.

0 comments on commit 029f663

Please sign in to comment.
Something went wrong with that request. Please try again.