Skip to content

Commit cc8df73

Browse files
committed
Replace jade with pug. Fixes microsoft#18219
1 parent c01ba26 commit cc8df73

9 files changed

Lines changed: 40 additions & 18 deletions

File tree

extensions/javascript/src/features/packageJSONContribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let LIMIT = 40;
1818
export class PackageJSONContribution implements IJSONContribution {
1919

2020
private mostDependedOn = ['lodash', 'async', 'underscore', 'request', 'commander', 'express', 'debug', 'chalk', 'colors', 'q', 'coffee-script',
21-
'mkdirp', 'optimist', 'through2', 'yeoman-generator', 'moment', 'bluebird', 'glob', 'gulp-util', 'minimist', 'cheerio', 'jade', 'redis', 'node-uuid',
21+
'mkdirp', 'optimist', 'through2', 'yeoman-generator', 'moment', 'bluebird', 'glob', 'gulp-util', 'minimist', 'cheerio', 'pug', 'redis', 'node-uuid',
2222
'socket', 'io', 'uglify-js', 'winston', 'through', 'fs-extra', 'handlebars', 'body-parser', 'rimraf', 'mime', 'semver', 'mongodb', 'jquery',
2323
'grunt', 'connect', 'yosay', 'underscore', 'string', 'xml2js', 'ejs', 'mongoose', 'marked', 'extend', 'mocha', 'superagent', 'js-yaml', 'xtend',
2424
'shelljs', 'gulp', 'yargs', 'browserify', 'minimatch', 'react', 'less', 'prompt', 'inquirer', 'ws', 'event-stream', 'inherits', 'mysql', 'esprima',
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"name": "jade",
2+
"name": "pug",
33
"version": "0.1.0",
44
"publisher": "vscode",
55
"engines": { "vscode": "*" },
66
"scripts": {
7-
"update-grammar": "node ../../build/npm/update-grammar.js davidrios/jade-tmbundle Syntaxes/Jade.tmLanguage ./syntaxes/Jade.json"
7+
"update-grammar": "node ../../build/npm/update-grammar.js davidrios/jade-tmbundle Syntaxes/Jade.tmLanguage ./syntaxes/pug.tmLanguage.json"
88
},
99
"contributes": {
1010
"languages": [{
1111
"id": "jade",
1212
"extensions": [ ".jade", ".pug" ],
13-
"aliases": [ "Jade", "jade" ],
13+
"aliases": [ "Pug", "Jade", "jade" ],
1414
"configuration": "./language-configuration.json"
1515
}],
1616
"grammars": [{
1717
"language": "jade",
1818
"scopeName": "text.jade",
19-
"path": "./syntaxes/Jade.json"
19+
"path": "./syntaxes/pug.tmLanguage.json"
2020
}]
2121
}
2222
}

extensions/jade/syntaxes/Jade.json renamed to extensions/pug/syntaxes/pug.tmLanguage.json

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@
3333
}
3434
]
3535
},
36+
{
37+
"begin": "<!--",
38+
"end": "--\\s*>",
39+
"name": "comment.unbuffered.block.jade",
40+
"patterns": [
41+
{
42+
"match": "--",
43+
"name": "invalid.illegal.comment.comment.block.jade"
44+
}
45+
]
46+
},
3647
{
3748
"begin": "^(\\s*)-$",
3849
"comment": "Unbuffered code block.",
@@ -45,10 +56,10 @@
4556
]
4657
},
4758
{
48-
"begin": "^(\\s*)(script)(?=[.#(\\s])((?![^\\n]*type=)|(?=[^\\n]*(text|application)/javascript))",
59+
"begin": "^(\\s*)(script)((\\.$)|(?=[^\\n]*(text|application)/javascript.*\\.$))",
4960
"beginCaptures": {
5061
"2": {
51-
"name": "entity.name.tag.script.jade"
62+
"name": "entity.name.tag.jade"
5263
}
5364
},
5465
"comment": "Script tag with JavaScript code.",
@@ -58,7 +69,6 @@
5869
{
5970
"begin": "\\G(?=\\()",
6071
"end": "$",
61-
"name": "stuff.tag.script.jade",
6272
"patterns": [
6373
{
6474
"include": "#tag_attributes"
@@ -68,7 +78,6 @@
6878
{
6979
"begin": "\\G(?=[.#])",
7080
"end": "$",
71-
"name": "stuff.tag.script.jade",
7281
"patterns": [
7382
{
7483
"include": "#complete_tag"
@@ -84,7 +93,7 @@
8493
"begin": "^(\\s*)(style)((\\.$)|(?=[.#(].*\\.$))",
8594
"beginCaptures": {
8695
"2": {
87-
"name": "entity.name.tag.script.jade"
96+
"name": "entity.name.tag.jade"
8897
}
8998
},
9099
"comment": "Style tag with CSS code.",
@@ -94,7 +103,6 @@
94103
{
95104
"begin": "\\G(?=\\()",
96105
"end": "$",
97-
"name": "stuff.tag.style.jade",
98106
"patterns": [
99107
{
100108
"include": "#tag_attributes"
@@ -104,7 +112,6 @@
104112
{
105113
"begin": "\\G(?=[.#])",
106114
"end": "$",
107-
"name": "stuff.tag.style.jade",
108115
"patterns": [
109116
{
110117
"include": "#complete_tag"
@@ -225,10 +232,10 @@
225232
"begin": "^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?<=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))",
226233
"beginCaptures": {
227234
"2": {
228-
"name": "constant.id.tag.jade"
235+
"name": "entity.other.attribute-name.id.jade"
229236
},
230237
"3": {
231-
"name": "constant.language.js"
238+
"name": "entity.other.attribute-name.class.jade"
232239
},
233240
"4": {
234241
"name": "meta.tag.other entity.name.tag.jade"
@@ -363,6 +370,18 @@
363370
}
364371
],
365372
"repository": {
373+
"babel_parens": {
374+
"begin": "\\(",
375+
"end": "\\)|(({\\s*)?$)",
376+
"patterns": [
377+
{
378+
"include": "#babel_parens"
379+
},
380+
{
381+
"include": "source.js"
382+
}
383+
]
384+
},
366385
"blocks_and_includes": {
367386
"captures": {
368387
"1": {
@@ -871,11 +890,11 @@
871890
}
872891
},
873892
"match": "\\.([^\\w-])?[\\w-]*",
874-
"name": "constant.language.js"
893+
"name": "entity.other.attribute-name.class.jade"
875894
},
876895
"tag_id": {
877896
"match": "#[\\w-]+",
878-
"name": "constant.id.tag.jade"
897+
"name": "entity.other.attribute-name.id.jade"
879898
},
880899
"tag_mixin_attributes": {
881900
"begin": "(&attributes\\()",
@@ -946,12 +965,15 @@
946965
}
947966
},
948967
"comment": "name = function() {}",
949-
"end": "(?=\\])|$",
968+
"end": "(?=\\])|(({\\s*)?$)",
950969
"name": "source.js",
951970
"patterns": [
952971
{
953972
"include": "#js_brackets"
954973
},
974+
{
975+
"include": "#babel_parens"
976+
},
955977
{
956978
"include": "source.js"
957979
}
@@ -960,5 +982,5 @@
960982
},
961983
"scopeName": "text.jade",
962984
"uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b",
963-
"version": "https://github.com/davidrios/jade-tmbundle/commit/7c1304aa5a0d916a93fd296d3dd994219ecdc90f"
985+
"version": "https://github.com/davidrios/jade-tmbundle/commit/f311a516bb29296fcebfdc7da8149b1c79dfb0a1"
964986
}
File renamed without changes.
File renamed without changes.

extensions/jade/test/colorize-results/test-4287_jade.json renamed to extensions/pug/test/colorize-results/test-4287_pug.json

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)