melody-compiler
Advanced tools
Comparing version 1.2.0-commit.644caa57 to 1.2.0-commit.66d6630f
{ | ||
"name": "melody-compiler", | ||
"version": "1.2.0-commit.644caa57", | ||
"version": "1.2.0-commit.66d6630f", | ||
"description": "", | ||
@@ -17,3 +17,3 @@ "main": "./lib/index.js", | ||
"lodash": "^4.12.0", | ||
"melody-code-frame": "1.2.0-commit.644caa57", | ||
"melody-code-frame": "1.2.0-commit.66d6630f", | ||
"random-seed": "^0.3.0" | ||
@@ -35,6 +35,6 @@ }, | ||
"devDependencies": { | ||
"melody-extension-core": "1.2.0-commit.644caa57", | ||
"melody-plugin-idom": "1.2.0-commit.644caa57", | ||
"melody-extension-core": "1.2.0-commit.66d6630f", | ||
"melody-plugin-idom": "1.2.0-commit.66d6630f", | ||
"rollup-plugin-babel": "^2.6.1" | ||
} | ||
} |
@@ -249,2 +249,19 @@ /** | ||
exit(path) { | ||
const sourceType = path.node.source.type; | ||
if (sourceType !== 'StringLiteral') { | ||
this.error( | ||
'Dynamic includes are not supported', | ||
path.node.loc.start, | ||
`The Include Statement expected a StringLiteral but got a ${sourceType}. | ||
Includes only support static strings as argument. | ||
To include a template asynchronously you can use the "mount async" statement: | ||
{% mount async './#{ partial }.twig' as 'bar-#{ partial }' with _context %} | ||
{{ err }} | ||
{% catch err %} | ||
Failed to load with {{ err }} | ||
{% endmounts %}` | ||
); | ||
} | ||
const includeName = this.addDefaultImportFrom( | ||
@@ -251,0 +268,0 @@ path.node.source.value, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206922
5020
+ Addedmelody-code-frame@1.2.0-commit.66d6630f(transitive)
- Removedmelody-code-frame@1.2.0-commit.644caa57(transitive)