diff options
author | 2021-03-24 11:45:38 -0400 | |
---|---|---|
committer | 2021-03-24 11:45:38 -0400 | |
commit | 3c24faa8cab428b17ba2f8e083f5296b1b931fe1 (patch) | |
tree | 940e2b6b68c2d7e895802fd451c7777f60c56eb6 /src/compiler/parse/index.ts | |
parent | 5c1cd5b1da446f51e535030072756126f7b038d7 (diff) | |
download | astro-3c24faa8cab428b17ba2f8e083f5296b1b931fe1.tar.gz astro-3c24faa8cab428b17ba2f8e083f5296b1b931fe1.tar.zst astro-3c24faa8cab428b17ba2f8e083f5296b1b931fe1.zip |
hmx ☞ astro (#22)
This changes all hmx files to astro files and updates all code to not reference hmx any more.
Diffstat (limited to 'src/compiler/parse/index.ts')
-rw-r--r-- | src/compiler/parse/index.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/parse/index.ts b/src/compiler/parse/index.ts index 00eccdb7d..052cf0317 100644 --- a/src/compiler/parse/index.ts +++ b/src/compiler/parse/index.ts @@ -226,7 +226,7 @@ export default function parse(template: string, options: ParserOptions = {}): As parser.error( { code: 'duplicate-style', - message: 'You can only have one <style> tag per HMX file', + message: 'You can only have one <style> tag per Astro file', }, parser.css[1].start ); @@ -234,15 +234,15 @@ export default function parse(template: string, options: ParserOptions = {}): As // const instance_scripts = parser.js.filter((script) => script.context === 'default'); // const module_scripts = parser.js.filter((script) => script.context === 'module'); - const hmx_scripts = parser.js.filter((script) => script.context === 'setup'); + const astro_scripts = parser.js.filter((script) => script.context === 'setup'); - if (hmx_scripts.length > 1) { + if (astro_scripts.length > 1) { parser.error( { code: 'invalid-script', message: 'A component can only have one frontmatter (---) script', }, - hmx_scripts[1].start + astro_scripts[1].start ); } @@ -260,6 +260,6 @@ export default function parse(template: string, options: ParserOptions = {}): As html: parser.html, css: parser.css[0], // instance: instance_scripts[0], - module: hmx_scripts[0], + module: astro_scripts[0], }; } |