aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-12-31 16:02:36 +0100
committerache <ache@ache.one>2018-12-31 16:02:36 +0100
commit48ccaa3eca86b2a284a0a291e5741ff553a54038 (patch)
tree8d85172e66dac3e1d2c66f73534d7f58e9eb20ae
parent3f17beaaaac2f8ed1e80d4fa2a506cb14843081c (diff)
Use babel
-rw-r--r--.babelrc6
-rw-r--r--package.json30
-rw-r--r--src/index.js (renamed from app.js)0
3 files changed, 25 insertions, 11 deletions
diff --git a/.babelrc b/.babelrc
new file mode 100644
index 0000000..cf18521
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,6 @@
+{
+ "presets": ["@babel/env"],
+ "plugins": [
+ ["@babel/plugin-proposal-object-rest-spread"]
+ ]
+}
diff --git a/package.json b/package.json
index 1b31927..0dd6b49 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,12 @@
{
"name": "remark-special-box",
"version": "0.1.0",
- "description": "A remark plugin for Markdown that parse special blox",
- "main": "app.js",
+ "description": "A remark plugin for markdown that parse special blox",
+ "main": "dist/index.js",
"scripts": {
"pretest": "xo",
- "test": "ava",
- "start": "node app.js"
+ "prepare": "del-cli dist && cross-env BABEL_ENV=production babel src --out-dir dist",
+ "test": "ava"
},
"dependencies": {
"unist-util-visit": "^1.1.3"
@@ -18,13 +18,21 @@
"remark"
],
"devDependencies": {
- "ava": "^0.25.0",
- "rehype-raw": "^2.0.0",
- "rehype-stringify": "^3.0.0",
- "remark-parse": "^5.0.0",
- "remark-rehype": "^3.0.0",
- "unified": "^6.1.6",
- "xo": "^0.18.2"
+ "@babel/cli": "7.x",
+ "@babel/core": "7.x",
+ "@babel/plugin-proposal-object-rest-spread": "7.x",
+ "@babel/preset-env": "7.x",
+ "ava": "1.x",
+ "cross-env": "5.x",
+ "del-cli": "1.x",
+ "dom5": "3.x",
+ "parse5": "5.x",
+ "rehype-raw": "4.x",
+ "rehype-stringify": "5.x",
+ "remark-parse": "6.x",
+ "remark-rehype": "4.x",
+ "unified": "7.x",
+ "xo": "0.23.x"
},
"xo": {
"space": true,
diff --git a/app.js b/src/index.js
index 6f8b5d5..6f8b5d5 100644
--- a/app.js
+++ b/src/index.js