Created
August 28, 2014 19:10
-
-
Save phpnode/acb7fbcbba00de9e3d99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jade = require('jade'); | |
// compile | |
var fn = jade.compile('p string of jade'); | |
console.log(fn()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "foo", | |
"version": "0.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"browserify": "browserify -o ./browserified.js ./index.js", | |
"uglify": "uglifyjs -o ./uglified.js ./browserified.js", | |
"test": "npm run browserify && npm run uglify && node ./uglified.js" | |
}, | |
"author": "", | |
"license": "MIT", | |
"devDependencies": { | |
"browserify": "^5.10.1", | |
"uglify-js": "^2.4.15" | |
}, | |
"dependencies": { | |
"jade": "^1.5.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install | |
npm test | |
du -h browserified.js | |
du -h uglified.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment