Created
January 23, 2017 20:04
-
-
Save CGamesPlay/11c68c6266efa87e2a32b2a23a88cd69 to your computer and use it in GitHub Desktop.
Screeps grunt / webpack config
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
Show hidden characters
{ | |
plugins: [ 'transform-flow-strip-types' ] | |
} |
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
const config = require('./screeps-multimeter'); | |
const webpack_config = require('./webpack.config'); | |
module.exports = function(grunt) { | |
grunt.loadNpmTasks('grunt-webpack'); | |
grunt.loadNpmTasks('grunt-screeps'); | |
grunt.initConfig({ | |
webpack: { | |
default: webpack_config | |
}, | |
screeps: { | |
options: { | |
email: config.email, | |
password: config.password, | |
branch: grunt.option('branch') || 'default', | |
ptr: false | |
}, | |
dist: { | |
src: ['dist/*.js'] | |
} | |
} | |
}); | |
grunt.registerTask('default', ['webpack:default', 'screeps']); | |
} |
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": "screeps", | |
"version": "1.0.0", | |
"description": "", | |
"main": "src/main.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Ryan Patterson <ry@cgamesplay.com> (http://cgamesplay.com/)", | |
"license": "ISC", | |
"dependencies": { | |
"babel-core": "^6.20.0", | |
"babel-loader": "^6.2.9", | |
"babel-plugin-transform-flow-strip-types": "^6.18.0", | |
"grunt": "^1.0.1", | |
"grunt-screeps": "^1.2.1", | |
"grunt-webpack": "^1.0.18", | |
"screeps-profiler": "^1.2.2", | |
"webpack": "^1.13.3", | |
"lodash": "3.10.1" | |
}, | |
"devDependencies": { | |
"screeps-api": "^0.2.8" | |
} | |
} |
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
const path = require('path'); | |
module.exports = { | |
entry: "./src/main.js", | |
output: { | |
path: path.join(__dirname, "dist"), | |
filename: "main.js", | |
library: "main", | |
libraryTarget: "commonjs2" | |
}, | |
externals: { | |
lodash: "lodash" | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loader: 'babel-loader', | |
} | |
] | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment