Skip to content

Commit

Permalink
refactor: update build strategy
Browse files Browse the repository at this point in the history
- remove old babel config
- remove webpack
- add new babel config
- add rollup config
- update packages
  • Loading branch information
jofftiquez committed Dec 20, 2019
1 parent 9308411 commit 43f9b9d
Show file tree
Hide file tree
Showing 8 changed files with 4,729 additions and 3,684 deletions.
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
parser: 'babel-eslint',
};
21 changes: 21 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = function (api) {
api.cache(true);

const presets = [
'@babel/preset-env'
// 'minify'
];
const plugins = [
'@babel/transform-runtime',
'@babel/plugin-proposal-export-default-from'
];
// const ignore = [
// '**/*.test.js'
// ];

return {
presets,
plugins
// ignore
};
};
26 changes: 0 additions & 26 deletions index.js

This file was deleted.

45 changes: 27 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue-morphling",
"version": "0.8.9",
"description": "A collection of VueJs filters.",
"main": "index.js",
"main": "dist/index.js",
"semistandard": {
"parser": "babel-eslint",
"ignore": [
Expand All @@ -21,12 +21,10 @@
"scripts": {
"test": "jest",
"lint": "semistandard --fix | snazzy",
"prebuild": "yarn lint",
"build": "rm -rf dist && webpack --progress --hide-modules",
"start:dev": "webpack --watch"
"prebuild": "yarn lint && rimraf dist",
"build": "rollup -c"
},
"dependencies": {
"babel-loader": "^7.1.2",
"cryptiles": "^4.1.3",
"date-fns": "^1.29.0",
"deep-extend": "^0.6.0",
Expand All @@ -44,20 +42,31 @@
"utf8-length": "^0.0.1"
},
"devDependencies": {
"@vue/test-utils": "^1.0.0-beta.13",
"babel-cli": "^6.26.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^21.2.0",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"jest": "^21.2.1",
"regenerator-runtime": "^0.11.0",
"semistandard": "^12.0.1",
"@babel/cli": "^7.7.5",
"@babel/core": "^7.7.5",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.7.5",
"@babel/preset-env": "^7.7.5",
"@babel/preset-es2015": "^7.0.0-beta.53",
"@babel/runtime": "^7.7.5",
"@rollup/plugin-node-resolve": "^6.0.0",
"@vue/test-utils": "^1.0.0-beta.30",
"babel-eslint": "^10.0.3",
"babel-minify": "^0.5.1",
"cross-env": "^6.0.3",
"eslint": "^6.7.2",
"jest": "^24.9.0",
"rimraf": "^3.0.0",
"rollup": "^1.27.9",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-uglify": "^6.0.3",
"semistandard": "^14.2.0",
"snazzy": "^8.0.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.11.0"
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"
},
"repository": {
"type": "git",
Expand Down
35 changes: 35 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
input: 'src/index.js',
output: [
{
exports: 'named',
name: 'vue-stripe-checkout',
file: 'dist/index.js',
format: 'esm'
},
{
exports: 'named',
name: 'VueStripeCheckout',
file: 'dist/vue-stripe-checkout.js',
format: 'umd'
}
],
plugins: [
terser(),
resolve(),
babel({
runtimeHelpers: true,
exclude: /node_modules/
}),
postcss({
plugins: []
}),
commonjs()
]
};
49 changes: 0 additions & 49 deletions webpack.config.js

This file was deleted.

Loading

0 comments on commit 43f9b9d

Please sign in to comment.