Skip to content

Commit

Permalink
Update build process (#146)
Browse files Browse the repository at this point in the history
* Update cspell tools

* Update build process

* Update cspell-tools

* Increase memory allowed to build for cs_cz, de_de, el, en_gb

* Danish - fix syntax error in .aff file.

* Allow two dictionaries at a time to be built

* Remove references to ../../node_modules

It breaks on Windows

* Update cspell-tools
  • Loading branch information
Jason3S committed Dec 23, 2019
1 parent eead2f5 commit 5e96581
Show file tree
Hide file tree
Showing 10 changed files with 181 additions and 376 deletions.
Expand Up @@ -8,7 +8,7 @@
"<%= fullPackageName %>-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools <%= command %> \"<%= srcFile %>\" -o .",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 cspell-tools <%= command %> \"<%= srcFile %>\" -o .",
"test": "head -n 100 \"<%= srcFile %>\" | cspell -v -c ./cspell-ext.json \"--local=<%= local %>\" \"--languageId=<%= languageId %>\" stdin",
"cspell-link": "node link.js",
"cspell-unlink": "node unlink.js",
Expand Down
493 changes: 149 additions & 344 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -2,17 +2,17 @@
"private": true,
"scripts": {
"test": "lerna run test",
"build": "lerna run --concurrency 1 build",
"build": "lerna run --concurrency 2 --stream build --no-bail",
"clean": "rimraf \"packages/*/*.txt.gz\"",
"postinstall": "lerna bootstrap",
"pub": "lerna bootstrap && npm test && lerna publish",
"prepublishOnly": "npm test"
},
"devDependencies": {
"cross-env": "^6.0.3",
"cspell": "^4.0.35",
"cspell-tools": "^4.1.3",
"hunspell-reader": "^3.1.2",
"cspell": "^4.0.43",
"cspell-tools": "^4.1.11",
"hunspell-reader": "^3.1.4",
"lerna": "^3.19.0",
"rimraf": "^3.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ca/package.json
Expand Up @@ -7,7 +7,7 @@
"cspell-dict-ca-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools compile-trie \"ca.dic\" -o .",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 cspell-tools compile-trie \"ca.dic\" -o .",
"test": "hunspell-reader words -n 1000 \"ca.dic\" | cspell -v -c ./cspell-ext.json --local=ca --languageId=* stdin",
"prepare": "cp ../../util/* .",
"cspell-link": "node link.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/cs_CZ/package.json
Expand Up @@ -7,7 +7,7 @@
"cspell-dict-cs-cz-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools compile-trie \"Czech.dic\" -o .",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 cspell-tools compile-trie \"Czech.dic\" -o .",
"test": "hunspell-reader words -n 1000 \"Czech.dic\" | cspell -v -c ./cspell-ext.json --local=cs --languageId=* stdin",
"prepare": "cp ../../util/* .",
"cspell-link": "node link.js",
Expand Down
40 changes: 20 additions & 20 deletions packages/da_DK/da_DK.aff
Expand Up @@ -38,7 +38,7 @@ MAXCPDSUGS 0

#Tillad at der ingen forslag kommer
ONLYMAXDIFF

NOSUGGEST 1111

REP 115
Expand All @@ -49,7 +49,7 @@ REP ^fremfor$ frem_for
REP ^påny$ på_ny
REP ^nutildags$ nu_til_dags
REP ^vedlige$ ved_lige #vedlige -> ved lige
REP k g #Enkeltbogstaver folk tit bytter om på, som herved kommer højere op på listen
REP k g #Enkeltbogstaver folk tit bytter om på, som herved kommer højere op på listen
REP g k
REP b p
REP p b
Expand All @@ -72,8 +72,8 @@ REP t d
REP o u
REP u o
REP d g
REP v hv #hv problematikken. vilket -> hvilket
REP hv v #hvores -> vores
REP v hv #hv problematikken. vilket -> hvilket
REP hv v #hvores -> vores
REP sj ti
REP ti j
REP j ti
Expand All @@ -88,13 +88,13 @@ REP k ch
REP ch k
REP ch sj
REP ch j
REP kk gg #Dobbelt bogstaver folk tit bytter om på
REP kk gg #Dobbelt bogstaver folk tit bytter om på
REP gg kk
REP mm nn
REP nn mm
REP bb pp
REP pp bb
REP n nn #Dobbelt bogstave eller ej
REP n nn #Dobbelt bogstave eller ej
REP nn n
REP l ll
REP ll l
Expand Down Expand Up @@ -170,8 +170,8 @@ SFX 7 0 ns/73,10,53,944,945 e +GENITIV
SFX 7 0 ens/944 [^e] +GENITIV
SFX 7 0 n/70,944 e +BESTEMT_ENTAL
SFX 7 0 en/70,944 [^e] +PLUR_UBEK
#Substantiv, konsonantfordobling, intetkøn, -er i flertal
SFX 9 Y 120
#Substantiv, konsonantfordobling, intetkøn, -er i flertal
SFX 9 Y 120
SFX 9 0 bet/944 b +KONSONANT_FORDOBLING
SFX 9 0 ber/944 b +KONSONANT_FORDOBLING
SFX 9 0 berne/944 b +KONSONANT_FORDOBLING
Expand Down Expand Up @@ -311,8 +311,8 @@ SFX 20 0 ene/944 [^e]r +PLUR_BEK
SFX 20 0 enes/944 [^e]r +PLUR_BEK
#Ulovligt ord
FORBIDDENWORD 36
#Substantiv, konsonantfordobling, fælleskøn, -er i flertal
SFX 46 Y 120
#Substantiv, konsonantfordobling, fælleskøn, -er i flertal
SFX 46 Y 120
SFX 46 0 ben/944 b +KONSONANT_FORDOBLING
SFX 46 0 ber/944 b +KONSONANT_FORDOBLING
SFX 46 0 berne/944 b +KONSONANT_FORDOBLING
Expand Down Expand Up @@ -439,7 +439,7 @@ NEEDAFFIX 53
#Proprium
SFX 55 Y 4
SFX 55 0 s [^sxz] +GENITIV
SFX 55 0 s +GENITIV
SFX 55 0 s . +GENITIV
SFX 55 0 ' [sxz] +GENITIV
SFX 55 0 es s +GENITIV
#Genitiv
Expand Down Expand Up @@ -541,8 +541,8 @@ SFX 131 0 r/84,10,53,945 r +KONSONANT_FORDOBLING
SFX 131 0 x/84,10,53,945 x +KONSONANT_FORDOBLING
SFX 131 0 t/53,84,10,945 t +KONSONANT_FORDOBLING
SFX 131 0 v/53,84,10,945 v +KONSONANT_FORDOBLING
#Substantiv, konsonantfordobling, intetkøn, -e i flertal
SFX 132 Y 120
#Substantiv, konsonantfordobling, intetkøn, -e i flertal
SFX 132 Y 120
SFX 132 0 bet/944 b +KONSONANT_FORDOBLING
SFX 132 0 be/944 b +KONSONANT_FORDOBLING
SFX 132 0 bene/944 b +KONSONANT_FORDOBLING
Expand Down Expand Up @@ -664,8 +664,8 @@ SFX 132 0 zets/944 z +KONSONANT_FORDOBLING
SFX 132 0 zes/944 z +KONSONANT_FORDOBLING
SFX 132 0 zenes/944 z +KONSONANT_FORDOBLING

#Substantiv, konsonantfordobling, fælleskøn, -e i flertal
SFX 133 Y 120
#Substantiv, konsonantfordobling, fælleskøn, -e i flertal
SFX 133 Y 120
SFX 133 0 ben/944 b +KONSONANT_FORDOBLING
SFX 133 0 be/944 b +KONSONANT_FORDOBLING
SFX 133 0 bene/944 b +KONSONANT_FORDOBLING
Expand Down Expand Up @@ -987,8 +987,8 @@ SFX 252 0 ene/944 [^er] +PLUR_BEK
SFX 252 0 ne/944 e +PLUR_BEK
SFX 252 0 ne/944 er +PLUR_BEK
SFX 252 0 ene/944 [^e]r +PLUR_BEK
#Substantiv, konsonantfordobling, intetkøn, -Ø i flertal
SFX 254 Y 80
#Substantiv, konsonantfordobling, intetkøn, -Ø i flertal
SFX 254 Y 80
SFX 254 0 bet/944 b +KONSONANT_FORDOBLING
SFX 254 0 bene/944 b +KONSONANT_FORDOBLING
SFX 254 0 bets/944 b +KONSONANT_FORDOBLING
Expand Down Expand Up @@ -1070,8 +1070,8 @@ SFX 254 0 zene/944 z +KONSONANT_FORDOBLING
SFX 254 0 zets/944 z +KONSONANT_FORDOBLING
SFX 254 0 zenes/944 z +KONSONANT_FORDOBLING

#Substantiv, konsonantfordobling, fælleskøn, -Ø i flertal
SFX 267 Y 80
#Substantiv, konsonantfordobling, fælleskøn, -Ø i flertal
SFX 267 Y 80
SFX 267 0 ben/944 b +KONSONANT_FORDOBLING
SFX 267 0 bens/944 b +KONSONANT_FORDOBLING
SFX 267 0 bene/944 b +KONSONANT_FORDOBLING
Expand Down Expand Up @@ -1628,4 +1628,4 @@ SFX 828 el let/944 [^dm]el +BESTEMT_ENTAL
SFX 828 el let/944 [^d]del +BESTEMT_ENTAL
SFX 828 el let/944 [^m]mel +BESTEMT_ENTAL
SFX 828 del let/944 ddel +BESTEMT_ENTAL
SFX 828 mel let/944 mmel +BESTEMT_ENTAL
SFX 828 mel let/944 mmel +BESTEMT_ENTAL
2 changes: 1 addition & 1 deletion packages/de_DE/package.json
Expand Up @@ -7,7 +7,7 @@
"cspell-dict-de-de-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools compile-trie \"German_de_DE.dic\" -o .",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 cspell-tools compile-trie \"German_de_DE.dic\" -o .",
"test": "hunspell-reader words -n 1000 \"German_de_DE.dic\" | cspell -v -c ./cspell-ext.json --local=de --languageId=* stdin",
"prepare": "cp ../../util/* .",
"cspell-link": "node link.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/el/package.json
Expand Up @@ -7,7 +7,7 @@
"cspell-dict-el-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools compile-trie \"Greek.txt\" -o .",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 cspell-tools compile-trie \"Greek.txt\" -o .",
"prepublishOnly": "cp ../../util/* .",
"test": "head -n 100 Greek.txt | cspell -v -c cspell-ext.json --local=el stdin",
"cspell-link": "node link.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/en_GB/package.json
Expand Up @@ -7,7 +7,7 @@
"cspell-dict-en-gb-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools compile-trie \"wordsEnGb.txt\" -o .",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 cspell-tools compile-trie \"wordsEnGb.txt\" -o .",
"prepare": "cp ../../util/* .",
"test-dict": "head -n 1000 \"wordsEnGb.txt\" | cspell -v -c ./cspell-ext.json --local=en_gb --languageId=* stdin",
"test-text": "cspell -v -c ./cspell-ext.json --local=en_gb --languageId=* \"tests/*.txt\"",
Expand Down
4 changes: 2 additions & 2 deletions packages/en_US/package.json
Expand Up @@ -8,8 +8,8 @@
},
"scripts": {
"merge-dictionaries": "cp src/hunspell/* dict && cat src/hunspell/en_US.dic src/en_US.txt > dict/en_US.dic",
"compile": "cspell-tools compile-trie \"dict/en_US.aff\" -o .",
"build": "npm run merge-dictionaries && npm run compile",
"compile": "cspell-tools compile-trie --merge en_US src/hunspell/en_US.dic src/en_US.txt -o .",
"build": "npm run compile",
"test-dict": "hunspell-reader words -n 10000 \"src/hunspell/en_US.dic\" | cspell -v -c ./cspell-ext.json --local=en --languageId=* stdin",
"test-text": "cspell -v -c ./cspell-ext.json --local=en --languageId=* \"tests/*.txt\"",
"test": "npm run test-dict && npm run test-text",
Expand Down

0 comments on commit 5e96581

Please sign in to comment.