This repository was archived by the owner on Jun 20, 2024. It is now read-only.
Commit d3a747e
committed
Remove the fs dependency in the TS build.
This should allow users who import dist/parser/stage-2-ast to not make
their compiler freak out.
Before:
- Have a grammar/liquid-html.ohm.js that reads liquid-html.ohm with fs
- Have a build/shims/liquid-html.ohm file that replaces the fs.readFile with the contents of the file
- Have a webpack alias that changes ../../grammar/liquid-html.ohm.js with the shim
After:
- Have a build script that pastes the content of grammar/liquid-html.ohm into grammar/liquid-html.ohm.js as a module.exports = String.raw``;
- Run that script before building
- Run that script before running tests
The advantage now is that there's no fs dependency in the TS build.1 parent 441f15c commit d3a747e
File tree
7 files changed
+9
-19
lines changed- build
- shims
- grammar
7 files changed
+9
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
Whitespace-only changes.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 25 | | |
34 | 26 | | |
35 | 27 | | |
| |||
0 commit comments