diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/README.md | 2 | ||||
-rw-r--r-- | src/compiler/parse/index.ts | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/README.md b/src/compiler/README.md index bef440860..f44d45ecf 100644 --- a/src/compiler/README.md +++ b/src/compiler/README.md @@ -1,3 +1,3 @@ -# `hmx/compiler` +# `astro/compiler` This directory is a fork of `svelte/compiler`. It is meant to stay as close to the original source as possible, so that upstream changes are easy to integrate. Everything svelte-specific and unrelated to parsing (compiler, preprocess, etc) has been removed.
\ No newline at end of file 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], }; } |