-
-
Save ITJesse/7594f2758a3ffaf80891d7449bc686bd 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
{ | |
"extends": [ | |
"airbnb" | |
], | |
"env": { | |
"browser": true | |
}, | |
"parser": "babel-eslint", | |
"rules": { | |
"indent": ["error", 2], | |
"strict": 0, | |
"no-restricted-syntax": 0, | |
"func-names": 0, | |
"no-param-reassign": 0, | |
"no-console": 0, | |
"no-mixed-operators": 0, | |
"no-continue": 0, | |
"space-before-function-paren": 0, | |
"max-len": ["error", { | |
"code": 80, | |
"ignoreUrls": true | |
}], | |
"arrow-parens": [1, "always"] | |
}, | |
"globals": { | |
"fabric": true, | |
"resolveLocalFileSystemURL": true, | |
"plugins": true, | |
"cordova": true, | |
"Media": true, | |
"FastClick": true | |
} | |
} |
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: ['babel-polyfill', './src/dream.js'],
output: {
path: path.resolve(__dirname, '../www'),
filename: 'bundle.js',
},
module: {
loaders: [
{
test: /.js?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
},
],
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
}),
new webpack.ProvidePlugin({
FastClick: 'fastclick',
}),
],
resolve: {
alias: {
// bind version of jquery-ui
'jquery-ui': 'jquery-ui-dist/jquery-ui.js',
modules: path.join(__dirname, 'node_modules'),
},
},
watch: true,
watchOptions: {
aggregateTimeout: 100,
poll: 1000,
},
devtool: 'source-map',
};
"build": "webpack --config webpack.config.js -p",
"dev": "webpack --config webpack.config.dev.js",
"eslint": "eslint --fix src/**/*.js",
"prettier": "prettier --write --trailing-comma all --single-quote --arrow-parens always \"src/**/*.js\"",
"format": "npm run prettier; npm run eslint"
},
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{
"plugins": [
["transform-object-rest-spread", { "useBuiltIns": true }]
],
"presets": [ "env" ]
}