Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre committed Mar 2, 2018
1 parent c0cd8d3 commit ab43032
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
[
"env",
{
"modules": false
}
]
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*.js
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue-picture-swipe",
"version": "0.1.0",
"description": "A Vue integration PhotoSwipe image plugin",
"main": "VuePictureSwipe.vue",
"main": "src/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -15,5 +15,22 @@
"vuejs"
],
"author": "rap2hpoutre",
"license": "MIT"
"license": "MIT",
"dependencies": {
"vue": "^2.5.13"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.3",
"babel-preset-env": "^1.6.1",
"cross-env": "^5.1.3",
"css-loader": "^0.28.10",
"file-loader": "^1.1.11",
"node-sass": "^4.7.2",
"sass-loader": "^6.0.6",
"vue-loader": "^14.1.1",
"vue-template-compiler": "^2.5.13",
"webpack": "^4.0.1",
"webpack-dev-server": "^3.1.0"
}
}
File renamed without changes.
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import VuejsHelloApp from './VuePictureSwipe.vue'
export default VuePictureSwipe
45 changes: 45 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
var path = require('path')
var webpack = require('webpack')

module.exports = {
entry: './src/main.js',

module: {
rules: [
// use babel-loader for js files
{ test: /\.js$/, use: 'babel-loader' },
// use vue-loader for .vue files
{ test: /\.vue$/, use: 'vue-loader' }
]
},
// default for pretty much every project
context: __dirname,
// specify your entry/main file
output: {
// specify your output directory...
path: path.resolve(__dirname, './dist'),
// and filename
filename: 'vue-picture-swipe.js'
}
}

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

0 comments on commit ab43032

Please sign in to comment.