Skip to content

Commit

Permalink
refactor(molecule): codegen grammar when building to reduce repo size
Browse files Browse the repository at this point in the history
  • Loading branch information
homura committed Aug 6, 2024
1 parent 5cbcb7f commit 46f337d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2,042 deletions.
64 changes: 3 additions & 61 deletions examples/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/molecule/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"",
"build": "pnpm run build:types && pnpm run build:js",
"build:types": "tsc --declaration --emitDeclarationOnly",
"build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s && pnpm run build:old",
"build:js": "pnpm generate:grammar && babel --root-mode upward src --out-dir lib --extensions .ts -s && pnpm run build:old",
"build:old": "shx mkdir -p lib/grammar && shx cp -r src/grammar/*.js lib/grammar",
"clean": "rm -rf lib",
"generate:grammar": "peggy -o ./src/grammar/grammar.js ./src/grammar/grammar.peggy",
Expand Down
1 change: 1 addition & 0 deletions packages/molecule/src/grammar/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grammar.js
Loading

0 comments on commit 46f337d

Please sign in to comment.