Skip to content

Commit 6ef5ec0

Browse files
committed
Refactor to externalize babel-plugin-inline-constants
Closes GH-7.
1 parent 264b0c0 commit 6ef5ec0

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.babelrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
[
4+
"babel-plugin-inline-constants",
5+
{
6+
"modules": [
7+
"micromark/lib/character/codes",
8+
"micromark/lib/constant/constants",
9+
"micromark/lib/constant/types"
10+
]
11+
}
12+
]
13+
]
14+
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"devDependencies": {
4343
"@babel/cli": "^7.0.0",
4444
"@babel/core": "^7.0.0",
45+
"babel-plugin-inline-constants": "^1.0.0",
4546
"browserify": "^17.0.0",
4647
"commonmark.json": "^0.29.0",
4748
"dtslint": "^4.0.0",
@@ -60,9 +61,8 @@
6061
"xo": "^0.34.0"
6162
},
6263
"scripts": {
63-
"prepare": "if [ -d \"micromark\" ] ; then\ncd \"micromark\" && git pull\nelse\ngit clone https://github.com/micromark/micromark.git\nfi",
6464
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
65-
"generate-dist": "babel lib/ --out-dir dist/ --quiet --retain-lines --plugins ./micromark/script/babel-transform-constants.js; prettier dist/ --loglevel error --write",
65+
"generate-dist": "babel lib/ --out-dir dist/ --quiet --retain-lines; prettier dist/ --loglevel error --write",
6666
"generate-size": "browserify . -p tinyify -s mdast-util-from-markdown -o mdast-util-from-markdown.min.js; gzip-size mdast-util-from-markdown.min.js",
6767
"generate": "npm run generate-dist && npm run generate-size",
6868
"test-api": "node test",

0 commit comments

Comments
 (0)