Skip to content

Commit

Permalink
feat: remove postinstall script, update readme.md (#53)
Browse files Browse the repository at this point in the history
* feat: remove postinstall script, update readme.md

* fix: fix CI
  • Loading branch information
NikitaShkaruba authored Jul 14, 2023
1 parent 9456244 commit 2ac6e20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
node-version: '18.x'
cache: 'npm'
- name: Install Packages
run: npm ci
run: npm ci && cd src/generator/ && npm ci
- name: Lint Files
run: npm run lint

Expand All @@ -39,7 +39,7 @@ jobs:
node-version: '18.x'
cache: 'npm'
- name: Install Packages
run: npm ci
run: npm ci && cd src/generator/ && npm ci
- name: Generate Parsers
run: npm run generate
- name: Check That Generated Files Are Unchanged
Expand All @@ -59,6 +59,6 @@ jobs:
node-version: '18.x'
cache: 'npm'
- name: Install Packages
run: npm ci
run: npm ci && cd src/generator/ && npm ci
- name: Unit Tests
run: npm run test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Resources to research:
4. `src/parsing/parsers/{dialect}/jison/structure.json` specifies paths to a lexer, and to all the grammar files.
5. Parser extension (basically the autocomplete features) is specified in `src/parsing/parsers/{dialect}/parser-extension.js`.
6. `src/generator/main.js` concatenates all the jison files into a single big jison file, and runs the jison tool with the specified lexer, then wires everything up with the `parser-extension.js`, generating `src/parsing/parsers/{dialect}/{dialect}AutocompleteParser.js`.
7. The generated file is in plain javascript, so we create a convenient typescript wrapper in `src/parsing/index.ts` with all the types and functions. Our users should include this file in their own projects (for the time being they need to compile it yourself)
7. The generated file is in plain javascript, so we create a convenient typescript wrapper in `src/parsing/index.ts` with all the types and functions. Our users should include this file in their own projects.

# Main scripts

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"types": "./dist/index.d.ts",
"scripts": {
"prepare": "husky install",
"postinstall": "cd src/generator && npm install",
"test": "npm run generate && npm run test_without_generate",
"test_without_generate": "jest src/parsing",
"generate": "cd src/generator && node main.js generic",
Expand Down

0 comments on commit 2ac6e20

Please sign in to comment.