Skip to content

Add .cjs to known JavaScript file extensions#85460

Merged
mjbvz merged 1 commit intomicrosoft:masterfrom
xiaoxiangmoe:master
Nov 26, 2019
Merged

Add .cjs to known JavaScript file extensions#85460
mjbvz merged 1 commit intomicrosoft:masterfrom
xiaoxiangmoe:master

Conversation

@xiaoxiangmoe
Copy link
Contributor

Add .cjs to known JavaScript file extensions.

Related:

@msftclas
Copy link

msftclas commented Nov 23, 2019

CLA assistant check
All CLA requirements met.

},
"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+|:|\\{)[^`~]*)?$)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

cd extensions/typescript-basics
npm run update-grammars

@mjbvz
Copy link
Collaborator

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
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 26, 2019

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants