Skip to content

Commit 7539372

Browse files
authored
Use babel instead of buba as buba has not been updated in a long time (#34)
1 parent 91a9a6a commit 7539372

File tree

5 files changed

+1283
-1087
lines changed

5 files changed

+1283
-1087
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["env"]
2+
"presets": ["@babel/preset-env"],
33
}

example/logger.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ Logger.prototype.log = function () {
1919

2020
this.element.appendChild(preTag);
2121

22-
preTag.textContent = Array.from(arguments).map((arg) => JSON.stringify(arg)).join(', ');
22+
preTag.textContent = Array.from(arguments).map((arg) => JSON.stringify(arg, null, 2)).join(', ');
2323

2424
preTag.classList.add('bg-info');
25+
preTag.style.maxHeight = '25vh';
2526

2627
return preTag;
2728
};

package.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"jsnext:main": "src/index.js",
77
"scripts": {
88
"test": "jest",
9-
"build": "rimraf lib dist && buba src -o lib && yarn rollup && uglifyjs dist/index.js -c \"warnings=false\" --comments -m -o dist/index.min.js --verbose",
9+
"build": "rimraf lib dist && yarn build:lib && yarn rollup && uglifyjs dist/index.js -c \"warnings=false\" --comments -m -o dist/index.min.js --verbose",
10+
"build:lib": "babel src --out-dir lib",
1011
"watch": "yarn rollup -w",
1112
"rollup": "rollup -c",
1213
"release": "node release.js",
@@ -29,14 +30,16 @@
2930
},
3031
"homepage": "https://github.com/maniator/servable#readme",
3132
"devDependencies": {
32-
"buba": "^4.0.2",
33-
"documentation": "8.1.2",
33+
"@babel/cli": "7.1.5",
34+
"@babel/core": "7.1.6",
35+
"@babel/preset-env": "7.1.6",
36+
"documentation": "9.0.0-alpha.1",
3437
"http-server": "^0.10.0",
3538
"inquirer": "^3.0.6",
3639
"jest": "23.6.0",
3740
"rimraf": "^2.6.1",
38-
"rollup": "^0.41.6",
39-
"rollup-plugin-buble": "^0.15.0",
41+
"rollup": "0.41.6",
42+
"rollup-plugin-babel": "4.0.3",
4043
"rollup-plugin-filesize": "^1.3.2",
4144
"rollup-plugin-license": "^0.3.0",
4245
"rollup-plugin-node-globals": "^1.1.0",
@@ -45,5 +48,8 @@
4548
"semver": "^5.3.0",
4649
"shelljs": "^0.7.7",
4750
"uglify-js": "^3.0.3"
51+
},
52+
"resolutions": {
53+
"babel-core": "7.0.0-bridge.0"
4854
}
4955
}

rollup.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import buble from 'rollup-plugin-buble';
1+
import babel from 'rollup-plugin-babel';
22
import nodeResolve from 'rollup-plugin-node-resolve';
33
import filesize from 'rollup-plugin-filesize';
44
import license from 'rollup-plugin-license';
@@ -18,7 +18,9 @@ export default {
1818
moduleName: 'Servable',
1919
sourceMap: true,
2020
plugins: [
21-
buble(),
21+
babel({
22+
exclude: 'node_modules/**'
23+
}),
2224
filesize(),
2325
globals(),
2426
license({

0 commit comments

Comments
 (0)