Skip to content

Instantly share code, notes, and snippets.

@smashingpat
Last active February 9, 2018 17:49
Show Gist options
  • Save smashingpat/b599fa0eee191f599baa241667a4f991 to your computer and use it in GitHub Desktop.
Save smashingpat/b599fa0eee191f599baa241667a4f991 to your computer and use it in GitHub Desktop.
simple prototype setup
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
# dependencies
node_modules/
# generated files
bundle.js

install

npm install # install de dependencies

usage

npm start     # start te server on port 9966
npm run build # build the file `bundle.js`
// your code here
{
"name": "prototype",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node server",
"build": "browserify index.js > bundle.js -t babelify"
},
"babel": {
"presets": [
"env",
"stage-0"
],
"plugins": [
"transform-runtime"
]
},
"license": "MIT",
"dependencies": {
"babel-core": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-0": "^6.24.1",
"babelify": "^8.0.0",
"browserify": "^14.5.0",
"budo": "^10.0.4"
}
}
const budo = require('budo')
const babelify = require('babelify')
budo('./index', {
live: true,
stream: process.stdout,
pushstate: true,
browserify: {
transform: babelify
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment