Commit e97dbf61 authored by Pan's avatar Pan

use babel-preset-env

parent cf1fb6cd
{ {
"presets": ["es2015", "stage-2"], "presets": [
["env", { "modules": false }],
"stage-2"
],
"plugins": ["transform-runtime"], "plugins": ["transform-runtime"],
"comments": false "comments": false
} }
(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 @@ ...@@ -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)
}
}());
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'; ...@@ -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)
}
}());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment