Skip to content

Commit b360124

Browse files
author
Ewing(Yu-An Lin)
committed
use gulp instead of webpack
1 parent 1f570d6 commit b360124

File tree

6 files changed

+51
-141
lines changed

6 files changed

+51
-141
lines changed

dist/vue-lodash.es5.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
/* eslint-disable */
7+
var VueLodash = {
8+
install: function install(Vue, _) {
9+
Vue._ = _;
10+
Object.defineProperties(Vue.prototype, {
11+
_: {
12+
get: function get() {
13+
return _;
14+
}
15+
}
16+
});
17+
Vue.mixin({
18+
mounted: function mounted() {
19+
// Just tell you that it is mounted
20+
// console.log('VueLodash');
21+
}
22+
});
23+
if (typeof window !== 'undefined' && window.Vue) {
24+
window.Vue.use(VueLodash);
25+
}
26+
}
27+
};
28+
29+
exports.default = VueLodash;

dist/vue-lodash.js

Lines changed: 0 additions & 105 deletions
This file was deleted.

dist/vue-lodash.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const gulp = require('gulp');
2+
const babel = require('gulp-babel');
3+
const uglify = require('gulp-uglifyjs');
4+
const rename = require('gulp-rename');
5+
6+
gulp.task('default', () => {
7+
return gulp.src('src/index.js')
8+
.pipe(babel({
9+
presets: ['es2015']
10+
}))
11+
.pipe(rename('vue-lodash.es5.js'))
12+
.pipe(gulp.dest('dist'))
13+
.pipe(uglify())
14+
.pipe(rename('vue-lodash.min.js'))
15+
.pipe(gulp.dest('dist'));
16+
});

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
"vue": ">= 2.0.0"
2222
},
2323
"devDependencies": {
24-
"babel": "^6.23.0",
25-
"babel-core": "^6.24.1",
26-
"babel-loader": "^7.0.0",
24+
"babel-core": "^6.18.0",
2725
"babel-preset-es2015": "^6.24.1",
28-
"uglifyjs-webpack-plugin": "^0.4.3",
29-
"webpack": "^2.4.1"
26+
"gulp": "^3.9.1",
27+
"gulp-babel": "^6.1.2",
28+
"gulp-rename": "^1.2.2",
29+
"gulp-uglifyjs": "^0.6.2"
3030
}
3131
}

webpack.config.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)