use babel-preset-env
This commit is contained in:
parent
cf1fb6cd4d
commit
e97dbf6115
5
.babelrc
5
.babelrc
|
@ -1,5 +1,8 @@
|
||||||
{
|
{
|
||||||
"presets": ["es2015", "stage-2"],
|
"presets": [
|
||||||
|
["env", { "modules": false }],
|
||||||
|
"stage-2"
|
||||||
|
],
|
||||||
"plugins": ["transform-runtime"],
|
"plugins": ["transform-runtime"],
|
||||||
"comments": false
|
"comments": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"babel-eslint": "7.2.3",
|
"babel-eslint": "7.2.3",
|
||||||
"babel-loader": "7.0.0",
|
"babel-loader": "7.0.0",
|
||||||
"babel-plugin-transform-runtime": "6.23.0",
|
"babel-plugin-transform-runtime": "6.23.0",
|
||||||
"babel-preset-es2015": "6.24.1",
|
"babel-preset-env": "1.5.2",
|
||||||
"babel-preset-stage-2": "6.24.1",
|
"babel-preset-stage-2": "6.24.1",
|
||||||
"babel-register": "6.24.1",
|
"babel-register": "6.24.1",
|
||||||
"chalk": "1.1.3",
|
"chalk": "1.1.3",
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
(function() {
|
const vueSticky = {};
|
||||||
const vueSticky = {};
|
let listenAction;
|
||||||
let listenAction;
|
vueSticky.install = Vue => {
|
||||||
vueSticky.install = Vue => {
|
|
||||||
Vue.directive('sticky', {
|
Vue.directive('sticky', {
|
||||||
inserted(el, binding) {
|
inserted(el, binding) {
|
||||||
const params = binding.value || {},
|
const params = binding.value || {},
|
||||||
|
@ -86,14 +85,7 @@
|
||||||
window.removeEventListener('scroll', listenAction)
|
window.removeEventListener('scroll', listenAction)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
if (typeof exports == 'object') {
|
|
||||||
module.exports = vueSticky
|
export default vueSticky
|
||||||
} else if (typeof define == 'function' && define.amd) {
|
|
||||||
define([], () => vueSticky)
|
|
||||||
} else if (window.Vue) {
|
|
||||||
window.vueSticky = vueSticky;
|
|
||||||
Vue.use(vueSticky)
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import './waves.css';
|
import './waves.css';
|
||||||
(function() {
|
|
||||||
const vueWaves = {};
|
const vueWaves = {};
|
||||||
vueWaves.install = (Vue, options = {}) => {
|
vueWaves.install = (Vue, options = {}) => {
|
||||||
Vue.directive('waves', {
|
Vue.directive('waves', {
|
||||||
bind(el, binding) {
|
bind(el, binding) {
|
||||||
el.addEventListener('click', e => {
|
el.addEventListener('click', e => {
|
||||||
|
@ -41,14 +41,7 @@ import './waves.css';
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
if (typeof exports == 'object') {
|
|
||||||
module.exports = vueWaves
|
export default vueWaves;
|
||||||
} else if (typeof define == 'function' && define.amd) {
|
|
||||||
define([], () => vueWaves)
|
|
||||||
} else if (window.Vue) {
|
|
||||||
window.vueWaves = vueWaves;
|
|
||||||
Vue.use(vueWaves)
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue