Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
# NPM ?= npm
# NPM ?= pnpm
NPM ?= yarn

# Written by humans
SRC = src/julia.grammar src/tokens.js
SRC = src/*

# Bundled by rollup
INDEX = dist/index.js dist/index.cjs

$(INDEX): $(SRC) # Generate parser and bundle into usable JS files
npm run prepare
$(NPM) run prepare

.PHONY: install test check clean

.PHONY: test check clean
install:
$(NPM) install

test: $(INDEX) test/*
npm run test
$(NPM) run test

check: # Ensure tooling is installed
node --version
npm --version
$(NPM) --version

clean: # Remove generated files
rm -f $(INDEX)

release:
npm publish
$(NPM) publish
git tag v$(cat package.json | jq -r .version)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To rebuild the parser after changing the grammar or the tokenizer:
```
yarn run prepare
```
If the build crashes with a GC related error, run `export NODE_OPTIONS="--max-old-space-size=8192"` and try again.
If the build crashes with a GC related error, run `export NODE_OPTIONS='--max-old-space-size=8192'` and try again.


To test the parser:
Expand Down
Loading