提交 3cdc7b74 编写于 作者: M Martin Aeschlimann

update all grammars script

上级 175cece4
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const cp = require('child_process');
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const integrationTests = process.platform === 'win32' ? '.\test-integration.bat' : './test-integration.sh';
function updateGrammar(location) {
const result = cp.spawnSync(npm, ['run', 'update-grammar'], {
cwd: location,
stdio: 'inherit'
});
if (result.error || result.status !== 0) {
process.exit(1);
}
}
const extensions = [
// 'bat' Grammar no longer available
'clojure',
'coffeescript',
'cpp',
'csharp',
'css',
'diff',
'docker',
'fsharp',
'gitsyntax',
'go',
'groovy',
'handlebars',
'hlsl',
'html',
'ini',
'java',
// 'javascript', updated through JavaScript
// 'json', customized
'less',
'lua',
'make',
'markdown',
'objective-c',
'perl',
'php',
// 'powershell', grammar not ready yet, @daviwil will ping when ready
'pug',
'python',
'r',
'razor',
'ruby',
'rust',
'scss',
'shaderlab',
'shellscript',
// 'sql', customized, PRs pending
'swift',
'typescript',
'vb',
'xml',
'yaml'
];
extensions.forEach(extension => updateGrammar(`extensions/${extension}`));
// run integration tests
if (process.platform === 'win32') {
cp.spawn('.\scripts\test-integration.bat', [], { env: process.env, stdio: 'inherit' });
} else {
cp.spawn('/bin/bash', ['./scripts/test-integration.sh'], { env: process.env, stdio: 'inherit' });
}
\ No newline at end of file
......@@ -21,7 +21,7 @@
},
"scripts": {
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json",
"update-grammars": "node ./build/update-grammars.js"
"update-grammar": "node ./build/update-grammars.js"
},
"activationEvents": [
"onLanguage:javascript",
......
......@@ -18,7 +18,8 @@
"monaco-editor-test": "mocha --only-monaco-editor",
"precommit": "node build/gulpfile.hygiene.js",
"gulp": "gulp --max_old_space_size=4096",
"7z": "7z"
"7z": "7z",
"update-grammars": "node build/npm/update-all-grammars.js"
},
"dependencies": {
"applicationinsights": "0.17.1",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册