Skip to content

Commit a26ba12

Browse files
authored
add prebuild and postgrammar scripts (markdoc#37)
1 parent 7a09fe9 commit a26ba12

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

build.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env node
12
const { buildSync } = require('esbuild');
23

34
const shared = {

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
"scripts": {
1818
"test": "node -r ts-eager/register ./node_modules/.bin/jasmine",
1919
"marktest": "node -r ts-eager/register ${INSPECT:+--inspect-brk} spec/marktest/index.ts spec/marktest/tests.yaml",
20-
"build": "npx patch-package && npm run build:common && npm run build:types",
20+
"prebuild": "npx patch-package",
21+
"build": "npm run build:common && npm run build:types",
2122
"build:common": "node build.js",
2223
"build:types": "tsc --emitDeclarationOnly --outDir dist",
2324
"lint": "eslint .",
24-
"grammar": "pegjs -o src/grammar/tag.js src/grammar/tag.pegjs && prettier --write src/grammar/tag.js",
25+
"grammar": "pegjs -o src/grammar/tag.js src/grammar/tag.pegjs",
26+
"postgrammar": "prettier --write src/grammar/tag.js",
2527
"prettier": "prettier --write index.ts src spec",
2628
"prettier:check": "prettier --check index.ts src spec",
2729
"type:check": "tsc --noEmit",

0 commit comments

Comments
 (0)