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

Add .cjs to known JavaScript file extensions #85460

Merged
merged 1 commit into from Nov 26, 2019
Merged

Conversation

@xiaoxiangmoe
Copy link
Contributor

xiaoxiangmoe commented Nov 23, 2019

Add .cjs to known JavaScript file extensions.

Related:

@msftclas

This comment has been minimized.

Copy link

msftclas commented Nov 23, 2019

CLA assistant check
All CLA requirements met.

@xiaoxiangmoe xiaoxiangmoe force-pushed the xiaoxiangmoe:master branch from 3d45ff7 to 991ed33 Nov 23, 2019
@@ -957,7 +957,7 @@
]
},
"fenced_code_block_js": {
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|\\{\\.js.+?\\})((\\s+|:|\\{)[^`~]*)?$)",
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|\\{\\.js.+?\\})((\\s+|:|\\{)[^`~]*)?$)",

This comment has been minimized.

Copy link
@mjbvz

mjbvz Nov 26, 2019

Contributor

Note that this grammar is generated from https://github.com/microsoft/vscode-markdown-tm-grammar

Make sure this is also updated upstream or else this change will be overwritten when we pull in the next update to this grammar

@@ -33,7 +33,7 @@ function patchGrammar(grammar) {

function adaptToJavaScript(grammar, replacementScope) {
grammar.name = 'JavaScript (with React support)';
grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs'];
grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs', '.cjs'];

This comment has been minimized.

Copy link
@mjbvz

mjbvz Nov 26, 2019

Contributor

Make sure to re-build the grammar after changing the build script:

cd extensions/typescript-basics
npm run update-grammars
@mjbvz

This comment has been minimized.

Copy link
Contributor

mjbvz commented Nov 26, 2019

Can you please create an issue for this as well. This helps us track what is delivered each milestone

@mjbvz mjbvz added this to the November 2019 milestone Nov 26, 2019
@mjbvz mjbvz merged commit 352d641 into microsoft:master Nov 26, 2019
4 checks passed
4 checks passed
linux
Details
windows
Details
darwin
Details
license/cla All CLA requirements met.
Details
@mjbvz

This comment has been minimized.

Copy link
Contributor

mjbvz commented Nov 26, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.