-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] Add
shouldParseScope
and disableTemplateLiteral
options
This PR refactors `modules` to enable users to pass an options, with three options currently supported: 1. `shouldParseScope`, which allows users to parse the `scope` parameter into a static format usable by the precompiler ```js { modules: { 'ember-cli-htmlbars': 'default', '@ember/template-compilation': { export: 'precompileTemplate', shouldParseScope: true, } } } ``` When enabled, the scope parameter is parsed, and then turned into an array of the keys on the object. If a non-object is passed, or any of the keys or values are not references, then an error is thrown. 2. `disableTemplateLiteral`, which disables using the precompile macro as a template tag. This should be used for `precompileTemplate` in `ember-cli-htmlbars` 3. `disableFunctionCall`, which disables using the precompile macro as a function call. This should be used by experimental template import syntaxes. This PR also refactors the way that imports statements are processed. They're now parsed in the beginning, in `Program`, ensuring that the parse step is only done once, and that we can build a list of all present imports in the file. This allows us to support more than one module at once. wip
- Loading branch information
Chris Garrett
committed
Feb 22, 2021
1 parent
14e3488
commit e5f4049
Showing
2 changed files
with
281 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.