Skip to content

Instantly share code, notes, and snippets.

@ITJesse
Created February 15, 2018 06:29
Show Gist options
  • Save ITJesse/7594f2758a3ffaf80891d7449bc686bd to your computer and use it in GitHub Desktop.
Save ITJesse/7594f2758a3ffaf80891d7449bc686bd to your computer and use it in GitHub Desktop.
{
"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
}
}
@ITJesse
Copy link
Author

ITJesse commented Feb 15, 2018

{
"plugins": [
["transform-object-rest-spread", { "useBuiltIns": true }]
],
"presets": [ "env" ]
}

@ITJesse
Copy link
Author

ITJesse commented Feb 15, 2018

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',
};

@ITJesse
Copy link
Author

ITJesse commented Feb 15, 2018

"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