Skip to content

Commit

Permalink
fix: language configurations are now correctly included in the build
Browse files Browse the repository at this point in the history
The fault was that they weren't copied to `dist/` with the built files, but referenced locally.
This meant they failed to occur in the published version of the extension.
Update syntaxes project `build` target with verbose commands syntax to copy them over correctly.
Retarget reference to distribution folder, so local builds won't present a false positive anymore.
This change correctly includes them in the bundle.
The required auto-closing/indentation/comment declarations are now contributed to ccini! ^_^.
  • Loading branch information
traunts committed Jan 29, 2023
1 parent df941a9 commit 473b06b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"extensions": [
".ini"
],
"configuration": "packages/syntaxes/src/language-configuration.json"
"configuration": "dist/packages/syntaxes/language-configuration.json"
}
],
"grammars": [
Expand Down
15 changes: 9 additions & 6 deletions packages/syntaxes/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
"projectType": "library",
"targets": {
"build": {
"command": "npx js-yaml packages/syntaxes/src/ccini.tmLanguage.yaml > dist/packages/syntaxes/ccini.tmLanguage.json",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "development",
"executor": "nx:run-commands",
"options": {
"outputPath": "dist/packages/syntaxes",
"tsConfig": "packages/syntaxes/tsconfig.lib.json"
"commands": [
"npx mkdirp \"dist/packages/syntaxes\"",
"npx js-yaml packages/syntaxes/src/ccini.tmLanguage.yaml > dist/packages/syntaxes/ccini.tmLanguage.json",
"cp packages/syntaxes/src/language-configuration.json dist/packages/syntaxes/language-configuration.json"
],
"outputPath": "dist/packages/syntaxes"
},
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"configurations": {
"development": {},
"production": {}
}
}
Expand Down

0 comments on commit 473b06b

Please sign in to comment.