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

chore: Prepare Basque for publishing #1780

Merged
merged 1 commit into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions dictionaries/eu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ The `cspell-ext.json` file in this package should be added to the import section
}
```

# Dictionary Development
## References

See: [How to Create a New Dictionary](https://github.com/streetsidesoftware/cspell-dicts#how-to-create-a-new-dictionary)
- Source: [jmigartua/basque_hunspell](https://github.com/jmigartua/basque_hunspell)

## License

MIT

> Some packages may have other licenses included.

<!--- cspell:ignore jmigartua --->
5 changes: 5 additions & 0 deletions dictionaries/eu/checksum.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
39f476f4f3066e89a62691f4ddc5f53d10a6a547 ./dict/eu.trie
a343188908a556fa1966f5c5a8ddcb6ae23d77ca ./source-dependencies.txt
95d2cab01a57cd837dbdb3f902fd3537a4985662 ./src/additional_words.txt
86de662e617f7a45e2deacca0b725ce6312c40d2 ./src/basque_hunspell/eu.aff
88f3524a0516c8a97fd06c591758efff787fcd72 ./src/basque_hunspell/eu.dic
25 changes: 1 addition & 24 deletions dictionaries/eu/cspell-ext.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
// cSpell Settings
{
"id": "eu",
"version": "0.2",
"name": "Basque",
"description": "Basque dictionary for cspell.",
"readonly": true,
// List of dictionary files to add to the global list of dictionaries
"dictionaryDefinitions": [
{
"name": "eu",
"path": "./dict/eu.trie",
"description": "Basque dictionary for cspell."
}
],
// Dictionaries to always be used.
// Generally left empty
"dictionaries": [],
// Language Rules to apply to matching files.
// Files are matched on `languageId` and `local`
"languageSettings": [
{
// VSCode languageId. i.e. typescript, java, go, cpp, javascript, markdown, latex
// * will match against any file type.
"languageId": "*",
// Language locale. i.e. en-US, de-AT, or ru. * will match all locales.
// Multiple locales can be specified like: "en, en-US" to match both English and English US.
"locale": "eu",
// By default the whole text of a file is included for spell checking
// Adding patterns to the "includeRegExpList" to only include matching patterns
"includeRegExpList": [],
// To exclude patterns, add them to "ignoreRegExpList"
"ignoreRegExpList": [],
// regex patterns than can be used with ignoreRegExpList or includeRegExpList
// Example: "pattern": [{ "name": "mdash", "pattern": "&mdash;" }]
// This could be included in "ignoreRegExpList": ["mdash"]
"patterns": [],
// List of dictionaries to enable by name in `dictionaryDefinitions`
"dictionaries": ["eu"],
// Dictionary definitions can also be supplied here. They are only used iff "languageId" and "locale" match.
"dictionaryDefinitions": []
"dictionaries": ["eu"]
}
]
}
5 changes: 3 additions & 2 deletions dictionaries/eu/cspell-tools.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
targets:
- name: "eu"
sources:
- filename: "src/eu.dic"
maxDepth: 1
- filename: "src/basque_hunspell/eu.dic"
maxDepth: 1 # This is set to 1 so it will build.
- src/additional_words.txt
format: "trie3"
targetDirectory: "./dict"
generateNonStrict: true
Expand Down
4 changes: 4 additions & 0 deletions dictionaries/eu/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"files": [
"**/*.{md,txt}"
],
"ignorePaths": [
"src/**",
"*.trie"
],
"dictionaries": [
"eu"
],
Expand Down
13 changes: 9 additions & 4 deletions dictionaries/eu/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "@cspell/dict-eu",
"version": "1.0.0",
"description": "Basque dictionary for cspell. -- Private until verified",
"private": true,
"description": "Basque dictionary for cspell.",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,8 +11,12 @@
"./cspell-ext.json": "./cspell-ext.json"
},
"scripts": {
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 cspell-tools-cli build",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 cspell-tools-cli build && yarn run gen-checksum",
"checksum": "shasum -c checksum.txt",
"conditional-build": "yarn run sync && yarn run --silent checksum || yarn run build",
"sync": "yarn cpy \"../../node_modules/basque_hunspell/eu.*\" \"src/basque_hunspell\" --flat",
"test": "hunspell-reader words -n 1000 -m 1\"src/eu.dic\" | cspell -v -c ./cspell-ext.json \"--local=eu\" \"--languageId=*\" stdin",
"gen-checksum": "cat source-dependencies.txt | sort -u | xargs shasum > checksum.txt",
"prepublishOnly": "echo OK",
"prepare": "echo OK"
},
Expand All @@ -35,7 +38,9 @@
"url": "https://github.com/streetsidesoftware/cspell-dicts/issues"
},
"homepage": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/dictionaries/eu#readme",
"devDependencies": {},
"devDependencies": {
"basque_hunspell": "https://github.com/jmigartua/basque_hunspell"
},
"dependencies": {},
"files": [
"dict/eu.trie",
Expand Down
5 changes: 5 additions & 0 deletions dictionaries/eu/source-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
./dict/eu.trie
./source-dependencies.txt
./src/additional_words.txt
./src/basque_hunspell/eu.aff
./src/basque_hunspell/eu.dic
4 changes: 4 additions & 0 deletions dictionaries/eu/src/additional_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Additionally, CSpell adds some extra words to that dictionary that are very common.
#
# There should be one entry per line.
# Consider adding words to ./shared-additional-words.txt if they are used by all flavors of English.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,10 @@ base64-js@^1.3.1:
resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==

"basque_hunspell@https://github.com/jmigartua/basque_hunspell":
version "0.0.0"
resolved "https://github.com/jmigartua/basque_hunspell#e9d9af129654466423480d1b4c38b06f6171ac5d"

before-after-hook@^2.2.0:
version "2.2.3"
resolved "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c"
Expand Down