Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre committed Apr 12, 2018
1 parent f32aae5 commit 67b0985
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"extends": "airbnb-base"
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"babel-preset-env": "^1.6.1",
"cross-env": "^5.1.3",
"css-loader": "^0.28.10",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.10.0",
"file-loader": "^1.1.11",
"node-sass": "^4.7.2",
"sass-loader": "^6.0.6",
Expand Down
5 changes: 3 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import VuePictureSwipe from './VuePictureSwipe.vue'
export default VuePictureSwipe
import VuePictureSwipe from './VuePictureSwipe.vue';

export default VuePictureSwipe;
30 changes: 15 additions & 15 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var path = require('path')
var webpack = require('webpack')
const path = require('path');
const webpack = require('webpack');

module.exports = {
entry: './src/main.js',
Expand All @@ -9,8 +9,8 @@ module.exports = {
// use babel-loader for js files
{ test: /\.js$/, use: 'babel-loader' },
// use vue-loader for .vue files
{ test: /\.vue$/, use: 'vue-loader' }
]
{ test: /\.vue$/, use: 'vue-loader' },
],
},
// default for pretty much every project
context: __dirname,
Expand All @@ -19,27 +19,27 @@ module.exports = {
// specify your output directory...
path: path.resolve(__dirname, './dist'),
// and filename
filename: 'vue-picture-swipe.js'
}
}
filename: 'vue-picture-swipe.js',
},
};

if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
module.exports.devtool = '#source-map';
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
NODE_ENV: '"production"',
},
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
warnings: false,
},
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
minimize: true,
}),
]);
}

0 comments on commit 67b0985

Please sign in to comment.