Update build process to make browserify work.

This commit is contained in:
Jonathan Bernard 2016-07-25 14:32:50 -05:00
parent 161a6bd06c
commit 39b87ac1a5
3 changed files with 8 additions and 2 deletions

4
spike-wars/.babelrc Normal file
View File

@ -0,0 +1,4 @@
{
"presets": ["es2015", "stage-0"],
"plugins": ["transform-flow-strip-types"]
}

View File

@ -65,8 +65,8 @@ task browserify(
dependsOn: [npmInstall, flowCheck], dependsOn: [npmInstall, flowCheck],
type: NodeTask) { type: NodeTask) {
inputs.dir('src/main/js/${project.name}.js') //inputs.dir('src/main/js/${project.name}.js')
outputs.file('build/webroot/js/${project.name}-${project.version}.js') //outputs.file('build/webroot/js/${project.name}-${project.version}.js')
doFirst { file('build/webroot/js').mkdirs() } doFirst { file('build/webroot/js').mkdirs() }
script = file('node_modules/browserify/bin/cmd.js') script = file('node_modules/browserify/bin/cmd.js')

View File

@ -13,7 +13,9 @@
"author": "Jonathan Bernard <jdbernard@gmail.com>", "author": "Jonathan Bernard <jdbernard@gmail.com>",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"babel-plugin-transform-flow-strip-types": "^6.8.0",
"babel-preset-es2015": "^6.9.0", "babel-preset-es2015": "^6.9.0",
"babel-preset-stage-0": "^6.5.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"browserify": "^13.0.1", "browserify": "^13.0.1",
"flow-bin": "^0.29.0" "flow-bin": "^0.29.0"