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

feat: support HTML/Vue/Angular #5259

Merged
merged 182 commits into from Nov 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
88bcec1
feat: support pragma
ikatyang Oct 11, 2018
a31faad
feat: update inferScriptParser
ikatyang Oct 11, 2018
9ca7260
refactor: extract htmlparser2
ikatyang Oct 11, 2018
1ea66da
feat: turn off self-closing recognizition
ikatyang Oct 11, 2018
fd4037c
feat: merge language-vue into language-html
ikatyang Oct 11, 2018
2174ad8
fix: force not to break <script src>
ikatyang Oct 11, 2018
e8a1200
chore: move pragma tests
ikatyang Oct 11, 2018
7f528c8
test: add tests
ikatyang Oct 12, 2018
f7b85b7
feat: recognize CDATA
ikatyang Oct 12, 2018
7ca1eb8
test: add tests
ikatyang Oct 12, 2018
ab2fa8f
fix: escape quotes in js-expression attributes
ikatyang Oct 12, 2018
ef57084
test: add tests
ikatyang Oct 12, 2018
a158d67
feat: support interpolation
ikatyang Oct 12, 2018
806863e
test: add tests
ikatyang Oct 12, 2018
f9401c4
feat: support angular binding syntax
ikatyang Oct 12, 2018
a8b5177
refactor: better path matching
ikatyang Oct 12, 2018
b13f505
test: add tests
ikatyang Oct 12, 2018
330cb2e
feat: support lit-html
ikatyang Oct 12, 2018
af7b7b2
feat: support angular component template
ikatyang Oct 12, 2018
719ecb3
test: update snapshots
ikatyang Oct 13, 2018
56d3e59
fix: no unnecessary parens for mdx
ikatyang Oct 13, 2018
6b968c5
test: add tests
ikatyang Oct 13, 2018
1a8264a
feat: format <script type=module>
ikatyang Oct 13, 2018
e0369c2
test: add tests
ikatyang Oct 13, 2018
b782967
feat: format `<script type="text/markdown">`
ikatyang Oct 13, 2018
522eaa4
test: add tests
ikatyang Oct 13, 2018
625ff41
feat: support `*ngFor`
ikatyang Oct 13, 2018
d461cd9
fix: remove space between ngForLetEqual
ikatyang Oct 13, 2018
f167629
test: add tests
ikatyang Oct 13, 2018
294ffa1
fix: no unexpected output for style/script content
ikatyang Oct 13, 2018
140fbf8
test: add tests
ikatyang Oct 13, 2018
1dc9d92
feat: allow tagging HTML templates with comment
ikatyang Oct 13, 2018
08c9495
test: add tests
ikatyang Oct 14, 2018
2c3b0dc
fix: allow surrounding spaces for `=` in NgLetEqual
ikatyang Oct 14, 2018
a1402a4
test: add tests
ikatyang Oct 14, 2018
a4fdc0b
fix: `:` in NgForColon is optional
ikatyang Oct 14, 2018
06e669b
refactor: extract printEmbeddedAttributeValue
ikatyang Oct 15, 2018
dbd86f0
test: add tests
ikatyang Oct 15, 2018
917be20
feat: support `v-for`
ikatyang Oct 15, 2018
95ff356
test: add tests
ikatyang Oct 16, 2018
6d541ac
feat: support v-for `(..., ...) of ...`
ikatyang Oct 16, 2018
cc940d7
test: remove invalid tests
ikatyang Oct 16, 2018
515a973
refactor
ikatyang Oct 16, 2018
060eed9
refactor
ikatyang Oct 16, 2018
f0fbc20
test: add tests
ikatyang Oct 16, 2018
fdfd533
feat: support jsStatement in v-on (@)
ikatyang Oct 16, 2018
43977cb
feat: only trigger framework-specific formatting in `parser:vue|angular`
ikatyang Oct 16, 2018
74fd94c
refactor
ikatyang Oct 16, 2018
73c00c3
test: add tests
ikatyang Oct 16, 2018
18e0c70
feat(vue): support `slot-scope`
ikatyang Oct 16, 2018
bc76ca0
chore(playground): add missing info for angular
ikatyang Oct 16, 2018
924a254
fix(vue): distinguish expression/statement in v-on
ikatyang Oct 16, 2018
dbb4a5f
fix(vue): use correct regex to distinguish v-on value
ikatyang Oct 16, 2018
5ea98e5
refactor
ikatyang Oct 16, 2018
35c666a
feat(vue): format slot-scope as function parameters
ikatyang Oct 16, 2018
5655b02
test: update tests
ikatyang Oct 18, 2018
b25e261
feat: support angular action/binding/interpolation
ikatyang Oct 18, 2018
e6c6adb
test: add tests
ikatyang Oct 19, 2018
e3b91b9
feat: support angular template bindings
ikatyang Oct 19, 2018
55057f9
test: add tests
ikatyang Oct 20, 2018
2f1ac60
fix: remove unexpected newlines
ikatyang Oct 20, 2018
907cfcb
test: add tests
ikatyang Oct 20, 2018
2958874
fix: disallow prettier-ignore for text node
ikatyang Oct 20, 2018
dd48e4d
test: add tests
ikatyang Oct 20, 2018
7758219
fix: handle prettier-ignore with borrowed tags
ikatyang Oct 20, 2018
002b3f8
test: add tests
ikatyang Oct 20, 2018
45d041f
feat(angular): format `on-`, `bind-` and `bindon-`
ikatyang Oct 20, 2018
eaa418f
test: add tests
ikatyang Oct 20, 2018
e78687b
fix: no unexpected newlines in comments
ikatyang Oct 20, 2018
feb12d1
test: add tests
ikatyang Oct 20, 2018
9d47dfc
fix: no unexpected newlines in open tags
ikatyang Oct 20, 2018
64a5ea5
test: add tests
ikatyang Oct 20, 2018
c292c5a
fix: no unexpected newlines in self-closing tag
ikatyang Oct 20, 2018
264a5fe
test: add tests
ikatyang Oct 20, 2018
beb35e8
fix: fill correctly
ikatyang Oct 20, 2018
9b0e5a4
test: add tests
ikatyang Oct 21, 2018
19dd0ed
fix: fill correctly
ikatyang Oct 21, 2018
c6d5f54
test: add tests
ikatyang Oct 21, 2018
3069966
fix: dedent comments correctly
ikatyang Oct 21, 2018
f69d916
test: add tests
ikatyang Oct 21, 2018
9d16454
fix: do not force breaking attr if open start marker is borrowed by prev
ikatyang Oct 21, 2018
c8094a7
test: add real-world test case
ikatyang Oct 21, 2018
91eaea2
Merge branch 'master' into feat/html/todos
ikatyang Oct 21, 2018
685d109
chore: fix mdx playground
ikatyang Oct 21, 2018
32f9013
test: add tests
ikatyang Oct 21, 2018
786aee6
fix: do not trigger interpolation in script-like tags
ikatyang Oct 21, 2018
d144ee4
test: add tests
ikatyang Oct 21, 2018
4112380
fix: no unexpected newlines in interpolations
ikatyang Oct 21, 2018
b9c5f25
test: add tests
ikatyang Oct 21, 2018
4ab4a9e
fix: treat `<template>` as inline
ikatyang Oct 21, 2018
ba824a3
test: add tests
ikatyang Oct 21, 2018
9a37090
fix: preserve tags in <pre>
ikatyang Oct 21, 2018
b80123d
fix: do not remove sensitive whitespace
ikatyang Oct 21, 2018
2a26ea5
test: add tests
ikatyang Oct 22, 2018
2c25b7e
test: add tests
ikatyang Oct 22, 2018
afb2792
fix: treat list-item as block
ikatyang Oct 22, 2018
bdaae2c
fix: avoid unnecessary child language formatting for null attribute
ikatyang Oct 22, 2018
eb2435f
test: add tests
ikatyang Oct 24, 2018
337c284
feat: switch to angular-html-parser
ikatyang Oct 24, 2018
e8adce6
Merge branch 'master' into feat/html/todos
ikatyang Oct 24, 2018
4e11526
chore: remove unnecessary dependencies
ikatyang Oct 24, 2018
510db00
refactor
ikatyang Oct 25, 2018
09744aa
test: add tests
ikatyang Oct 25, 2018
221aa1c
fix: print pre-like tags correctly
ikatyang Oct 25, 2018
43234e1
Merge branch 'master' into feat/html/todos
ikatyang Oct 25, 2018
ab96b2e
feat(angular): add surrounding spaces for `=` in NGMicrosyntaxLet
ikatyang Oct 25, 2018
6e6fc98
test: add tests
ikatyang Oct 25, 2018
5a0bd75
fix(angular): trailing comma is not allowed in angular-specifix syntax
ikatyang Oct 25, 2018
fdfcd7b
test: add tests
ikatyang Oct 25, 2018
5e0533b
fix(angular): add missing parens for pipe expression in some cases
ikatyang Oct 25, 2018
3195482
style: fix linting
ikatyang Oct 25, 2018
3a59ef2
test: add tests
ikatyang Oct 25, 2018
ae74fa2
fix(angular): add parens for pipe in memberExpression.object
ikatyang Oct 25, 2018
dd2a16b
test: add tests
ikatyang Oct 25, 2018
f295fc3
fix(angular): add parens for pipe in callExpression.callee
ikatyang Oct 25, 2018
2d874ab
test: add tests
ikatyang Oct 26, 2018
a7eb4e5
fix: update angular-estree-parser to fix unexpected `-1` formatting
ikatyang Oct 26, 2018
35f91e2
test: add tests
ikatyang Oct 26, 2018
5ec06f7
feat: add a special case for interpolation-only elements
ikatyang Oct 26, 2018
9a048bc
Merge branch 'master' into feat/html/todos
ikatyang Oct 26, 2018
b0b9a2e
refactor
ikatyang Oct 26, 2018
be9ecdf
test: add tests
ikatyang Oct 26, 2018
d52524e
fix: leading/trailing spaces in inline-block are insensitive
ikatyang Oct 26, 2018
0cc6987
test: add tests
ikatyang Oct 27, 2018
73283a3
fix: add css display for video, audio, source and track
ikatyang Oct 27, 2018
ee952e6
chore(deps): remove unused dependency
ikatyang Oct 27, 2018
423f165
test: add tests
ikatyang Oct 28, 2018
e6cfed3
feat: add spaces for interpolations
ikatyang Oct 28, 2018
cc2bad1
Merge branch 'master' into feat/html/todos
ikatyang Oct 28, 2018
4a6ac43
test: update snapshots
ikatyang Oct 28, 2018
03efd87
style: fix linting
ikatyang Oct 28, 2018
ad81d85
test: add tests
ikatyang Oct 29, 2018
efb4d35
fix: only hug if both leading and trailing spaces are sensitive
ikatyang Oct 29, 2018
a3a7f92
test: add tests
ikatyang Oct 29, 2018
fa1436a
fix(angular): add missing softlines
ikatyang Oct 29, 2018
1fd8844
test: add tests
ikatyang Oct 29, 2018
245a309
fix(angular): correct indent for root logical expression
ikatyang Oct 29, 2018
cf6b802
fix(angular): put pipe operator on the beginning of the line
ikatyang Oct 29, 2018
f4f2a02
test: add tests
ikatyang Oct 29, 2018
01f1fb3
fix(vue): add missing softlines
ikatyang Oct 29, 2018
40db04f
test: add tests
ikatyang Oct 30, 2018
4904c1f
fix: always use single quote for expression in attribute
ikatyang Oct 30, 2018
7c9a76a
test: add tests
ikatyang Oct 30, 2018
3dc4477
fix(angular): do not remove `this.`
ikatyang Oct 30, 2018
875caac
test: add tests
ikatyang Oct 30, 2018
a0711c1
feat(angular): only add parens in action expr if it has no side effect
ikatyang Oct 30, 2018
2277d5e
test: add tests
ikatyang Oct 30, 2018
fffa49d
feat: respect linebreak before/after custom elements
ikatyang Oct 30, 2018
54ef258
test: add tests
ikatyang Nov 1, 2018
e6f2acf
fix: correctly print comments in js expression
ikatyang Nov 1, 2018
413ba1c
test: add tests
ikatyang Nov 1, 2018
217873d
fix(angular): improve pipe formatting
ikatyang Nov 1, 2018
41c3cd2
test: add tests
ikatyang Nov 1, 2018
6ef1328
feat: support img.srcset
ikatyang Nov 1, 2018
17d05f9
test: add tests
ikatyang Nov 1, 2018
1a83e6b
feat: support prettier-ignore-attribute
ikatyang Nov 1, 2018
61519c3
feat: format source.srcset as well
ikatyang Nov 1, 2018
4e84e47
test: add tests
ikatyang Nov 1, 2018
6274f12
fix: disable tag name normalization for foreign tags
ikatyang Nov 1, 2018
0a00ffc
test: add tests
ikatyang Nov 1, 2018
c64f50f
fix: `|` in vue expressions are considered vue filters
ikatyang Nov 1, 2018
298262f
test: add tests
ikatyang Nov 2, 2018
d38536a
fix(angular): correct chained optional expression
ikatyang Nov 2, 2018
c126eb0
test: add tests
ikatyang Nov 2, 2018
15316f7
test: add tests
ikatyang Nov 2, 2018
44f211a
fix: remove unexpected newlines
ikatyang Nov 2, 2018
f2c9532
fix: potential regex.lastIndex issue
ikatyang Nov 2, 2018
7c47af8
test: add tests
ikatyang Nov 2, 2018
b152801
fix: do not break non-breaking whitespace
ikatyang Nov 2, 2018
ef3e23e
test: add tests
ikatyang Nov 2, 2018
a4dce4b
refactor
ikatyang Nov 2, 2018
3d712d7
refactor
ikatyang Nov 2, 2018
68bb0d7
refactor
ikatyang Nov 2, 2018
38ab648
refactor
ikatyang Nov 2, 2018
4eafbf1
refactor
ikatyang Nov 2, 2018
5de51d3
feat: treat simple element as text
ikatyang Nov 2, 2018
4df14e0
test: add tests
ikatyang Nov 2, 2018
cc19d0a
fix: hug array expression
ikatyang Nov 2, 2018
c17a52c
fix: do not throw on root custom elements
ikatyang Nov 3, 2018
ddc9599
refactor
ikatyang Nov 4, 2018
1b74237
test: add tests
ikatyang Nov 4, 2018
519024c
feat: improve svg in html formatting
ikatyang Nov 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -14,18 +14,20 @@
"node": ">=6"
},
"dependencies": {
"@angular/compiler": "6.1.10",
"@babel/code-frame": "7.0.0-beta.46",
"@babel/parser": "7.1.2",
"@glimmer/syntax": "0.30.3",
"@iarna/toml": "2.0.0",
"angular-estree-parser": "1.1.3",
"angular-html-parser": "1.0.0",
"camelcase": "4.1.0",
"chalk": "2.1.0",
"cjk-regex": "2.0.0",
"cosmiconfig": "5.0.6",
"dashify": "0.2.2",
"dedent": "0.7.0",
"diff": "3.2.0",
"domhandler": "2.4.2",
"editorconfig": "0.15.2",
"editorconfig-to-prettier": "0.0.6",
"emoji-regex": "6.5.1",
Expand All @@ -40,7 +42,6 @@
"html-element-attributes": "2.0.0",
"html-styles": "1.0.0",
"html-tag-names": "1.1.2",
"htmlparser2": "3.9.2",
"ignore": "3.3.7",
"jest-docblock": "23.2.0",
"json-stable-stringify": "1.0.1",
Expand All @@ -53,7 +54,7 @@
"minimist": "1.2.0",
"n-readlines": "1.0.0",
"normalize-path": "3.0.0",
"parse5-htmlparser2-tree-adapter": "5.0.0",
"parse-srcset": "ikatyang/parse-srcset#feat/report-error",
"postcss-less": "1.1.5",
"postcss-media-query-parser": "0.2.3",
"postcss-scss": "1.0.6",
Expand Down
17 changes: 13 additions & 4 deletions scripts/build/config.js
@@ -1,6 +1,7 @@
"use strict";

const path = require("path");
const PROJECT_ROOT = path.resolve(__dirname, "../..");

/**
* @typedef {Object} Bundle
Expand Down Expand Up @@ -38,6 +39,18 @@ const parsers = [
input: "src/language-js/parser-typescript.js",
target: "universal"
},
{
input: "src/language-js/parser-angular.js",
target: "universal",
alias: {
// Force using the CJS file, instead of ESM; i.e. get the file
// from `"main"` instead of `"module"` (rollup default) of package.json
"lines-and-columns": require.resolve("lines-and-columns"),
"@angular/compiler/src": path.resolve(
`${PROJECT_ROOT}/node_modules/@angular/compiler/esm2015/src`
)
}
},
{
input: "src/language-css/parser-postcss.js",
target: "universal",
Expand All @@ -52,10 +65,6 @@ const parsers = [
input: "src/language-markdown/parser-markdown.js",
target: "universal"
},
{
input: "src/language-vue/parser-vue.js",
target: "universal"
},
{
input: "src/language-handlebars/parser-glimmer.js",
target: "universal",
Expand Down
42 changes: 32 additions & 10 deletions src/common/internal-plugins.js
Expand Up @@ -29,6 +29,10 @@ module.exports = [
return eval("require")("../language-js/parser-babylon").parsers
.__js_expression;
},
get __vue_expression() {
return eval("require")("../language-js/parser-babylon").parsers
.__vue_expression;
},
// JS - Flow
get flow() {
return eval("require")("../language-js/parser-flow").parsers.flow;
Expand All @@ -44,6 +48,26 @@ module.exports = [
get "typescript-eslint"() {
return eval("require")("../language-js/parser-typescript").parsers
.typescript;
},
// JS - Angular Action
get __ng_action() {
return eval("require")("../language-js/parser-angular").parsers
.__ng_action;
},
// JS - Angular Binding
get __ng_binding() {
return eval("require")("../language-js/parser-angular").parsers
.__ng_binding;
},
// JS - Angular Interpolation
get __ng_interpolation() {
return eval("require")("../language-js/parser-angular").parsers
.__ng_interpolation;
},
// JS - Angular Directive
get __ng_directive() {
return eval("require")("../language-js/parser-angular").parsers
.__ng_directive;
}
}
},
Expand Down Expand Up @@ -107,22 +131,20 @@ module.exports = [
}
},

// HTML
require("../language-html"),
{
parsers: {
// HTML
get html() {
return eval("require")("../language-html/parser-html").parsers.html;
}
}
},

// Vue
require("../language-vue"),
{
parsers: {
},
// Vue
get vue() {
return eval("require")("../language-vue/parser-vue").parsers.vue;
return eval("require")("../language-html/parser-html").parsers.vue;
},
// Angular
get angular() {
return eval("require")("../language-html/parser-html").parsers.angular;
}
}
},
Expand Down
13 changes: 9 additions & 4 deletions src/common/util.js
Expand Up @@ -464,9 +464,11 @@ function printString(raw, options, isDirectiveLiteral) {
const enclosingQuote =
options.parser === "json"
? double.quote
: shouldUseAlternateQuote
? alternate.quote
: preferred.quote;
: options.__isInHtmlAttribute
? single.quote
: shouldUseAlternateQuote
? alternate.quote
: preferred.quote;

// Directives are exact code unit sequences, which means that you can't
// change the escape sequences they use.
Expand All @@ -489,7 +491,10 @@ function printString(raw, options, isDirectiveLiteral) {
!(
options.parser === "css" ||
options.parser === "less" ||
options.parser === "scss"
options.parser === "scss" ||
options.parentParser === "html" ||
options.parentParser === "vue" ||
options.parentParser === "angular"
)
);
}
Expand Down
136 changes: 136 additions & 0 deletions src/language-html/ast.js
@@ -0,0 +1,136 @@
"use strict";

const NODES_KEYS = {
attrs: true,
children: true
};

class Node {
constructor(props = {}) {
for (const key of Object.keys(props)) {
const value = props[key];
if (key in NODES_KEYS) {
this._setNodes(key, value);
} else {
this[key] = value;
}
}
}

_setNodes(key, nodes) {
if (nodes !== this[key]) {
this[key] = cloneAndUpdateNodes(nodes, this);
if (key === "attrs") {
setNonEnumerableProperties(this, {
attrMap: this[key].reduce((reduced, attr) => {
reduced[attr.fullName] = attr.value;
return reduced;
}, Object.create(null))
});
}
}
}

map(fn) {
let newNode = null;

for (const NODES_KEY in NODES_KEYS) {
const nodes = this[NODES_KEY];
if (nodes) {
const mappedNodes = mapNodesIfChanged(nodes, node => node.map(fn));
if (newNode !== nodes) {
if (!newNode) {
newNode = new Node();
}
newNode._setNodes(NODES_KEY, mappedNodes);
}
}
}

if (newNode) {
for (const key in this) {
if (!(key in NODES_KEYS)) {
newNode[key] = this[key];
}
}
const { index, siblings, prev, next, parent } = this;
setNonEnumerableProperties(newNode, {
index,
siblings,
prev,
next,
parent
});
}

return fn(newNode || this);
}

clone(overrides) {
return new Node(overrides ? Object.assign({}, this, overrides) : this);
}

get firstChild() {
return this.children && this.children.length !== 0
? this.children[0]
: null;
}

get lastChild() {
return this.children && this.children.length !== 0
? this.children[this.children.length - 1]
: null;
}

// for element and attribute
get rawName() {
return this.hasExplicitNamespace ? this.fullName : this.name;
}
get fullName() {
return this.namespace ? this.namespace + ":" + this.name : this.name;
}
}

function mapNodesIfChanged(nodes, fn) {
const newNodes = nodes.map(fn);
return newNodes.some((newNode, index) => newNode !== nodes[index])
? newNodes
: nodes;
}

function cloneAndUpdateNodes(nodes, parent) {
const siblings = nodes.map(
node => (node instanceof Node ? node.clone() : new Node(node))
);

let prev = null;
let current = siblings[0];
let next = siblings[1] || null;

for (let index = 0; index < siblings.length; index++) {
setNonEnumerableProperties(current, {
index,
siblings,
prev,
next,
parent
});
prev = current;
current = next;
next = siblings[index + 2] || null;
}

return siblings;
}

function setNonEnumerableProperties(obj, props) {
const descriptors = Object.keys(props).reduce((reduced, key) => {
reduced[key] = { value: props[key], enumerable: false };
return reduced;
}, {});
Object.defineProperties(obj, descriptors);
}

module.exports = {
Node
};
12 changes: 7 additions & 5 deletions src/language-html/clean.js
@@ -1,9 +1,11 @@
"use strict";

module.exports = function(ast, newNode) {
delete newNode.startIndex;
delete newNode.endIndex;
delete newNode.attribs;
delete newNode.sourceSpan;
delete newNode.startSourceSpan;
delete newNode.endSourceSpan;
delete newNode.nameSpan;
delete newNode.valueSpan;

if (ast.type === "text" || ast.type === "comment") {
return null;
Expand All @@ -18,7 +20,7 @@ module.exports = function(ast, newNode) {
delete newNode.value;
}

if (ast.type === "directive" && ast.name === "!doctype") {
delete newNode.data;
if (ast.type === "docType") {
delete newNode.value;
}
};
14 changes: 13 additions & 1 deletion src/language-html/constants.evaluate.js
Expand Up @@ -17,7 +17,19 @@ const getCssStyleTags = property =>
)
.reduce((reduced, value) => Object.assign(reduced, value), {});

const CSS_DISPLAY_TAGS = getCssStyleTags("display");
const CSS_DISPLAY_TAGS = Object.assign({}, getCssStyleTags("display"), {
// TODO: send PR to upstream
button: "inline-block",

// special cases for some css display=none elements
template: "inline",
source: "block",
track: "block",

// there's no css display for these elements but they behave these ways
video: "inline-block",
audio: "inline-block"
});
const CSS_DISPLAY_DEFAULT = "inline";
const CSS_WHITE_SPACE_TAGS = getCssStyleTags("white-space");
const CSS_WHITE_SPACE_DEFAULT = "normal";
Expand Down
22 changes: 20 additions & 2 deletions src/language-html/index.js
@@ -1,21 +1,39 @@
"use strict";

const printer = require("./printer-htmlparser2");
const printer = require("./printer-html");
const createLanguage = require("../utils/create-language");
const options = require("./options");

const languages = [
createLanguage(require("linguist-languages/data/html"), {
override: {
name: "Angular",
since: "1.15.0",
parsers: ["angular"],
vscodeLanguageIds: ["html"],

extensions: [".component.html"],
filenames: []
}
}),
createLanguage(require("linguist-languages/data/html"), {
override: {
since: "1.15.0",
parsers: ["html"],
vscodeLanguageIds: ["html"]
}
}),
createLanguage(require("linguist-languages/data/vue"), {
override: {
since: "1.10.0",
parsers: ["vue"],
vscodeLanguageIds: ["vue"]
}
})
];

const printers = {
htmlparser2: printer
html: printer
};

module.exports = {
Expand Down