Skip to content

Commit

Permalink
Lang conf file must be copied to dist (#276)
Browse files Browse the repository at this point in the history
* Lang conf file must be copied to dist

* PR fix
  • Loading branch information
StephenWeatherford authored Aug 26, 2019
1 parent d31ea2d commit 21a07b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ import { gulp_installAzureAccount, gulp_webpack } from 'vscode-azureextensiondev

const env = process.env;

export const jsonArmGrammarSourcePath: string = path.resolve('grammars/JSONC.arm.tmLanguage.json');
export const jsonArmGrammarDestPath: string = path.resolve('dist/grammars/JSONC.arm.tmLanguage.json');
const jsonArmGrammarSourcePath: string = path.resolve('grammars', 'JSONC.arm.tmLanguage.json');
const jsonArmGrammarDestPath: string = path.resolve('dist', 'grammars', 'JSONC.arm.tmLanguage.json');

export const tleGrammarSourcePath: string = path.resolve('grammars/arm-expression-string.tmLanguage.json');
export const tleGrammarBuiltPath: string = path.resolve('dist/grammars/arm-expression-string.tmLanguage.json');
const tleGrammarSourcePath: string = path.resolve('grammars', 'arm-expression-string.tmLanguage.json');
const tleGrammarBuiltPath: string = path.resolve('dist', 'grammars', 'arm-expression-string.tmLanguage.json');

export interface IGrammar {
const armConfigurationSourcePath: string = path.resolve('grammars', 'jsonc.arm.language-configuration.json');
const armConfigurationDestPath: string = path.resolve('dist', 'grammars', 'jsonc.arm.language-configuration.json');

interface IGrammar {
preprocess?: {
"builtin-functions": string;
[key: string]: string;
Expand Down Expand Up @@ -104,6 +107,8 @@ async function buildGrammars(): Promise<void> {

fs.copyFileSync(jsonArmGrammarSourcePath, jsonArmGrammarDestPath);
console.log(`Copied ${jsonArmGrammarDestPath}`);
fs.copyFileSync(armConfigurationSourcePath, armConfigurationDestPath);
console.log(`Copied ${armConfigurationDestPath}`);
}

// tslint:disable-next-line:no-suspicious-comment
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"aliases": [
"ARM Deployment Template"
],
"configuration": "grammars/jsonc.arm.language-configuration.json",
"configuration": "dist/grammars/jsonc.arm.language-configuration.json",
"extensions": [
".arm"
]
Expand Down

0 comments on commit 21a07b9

Please sign in to comment.