-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13719 from chadhietala/cleanup-compile-helpers
[CLEANUP] Compile/precompile should use same code path
- Loading branch information
Showing
5 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/ember-glimmer-template-compiler/tests/utils/helpers.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
import { | ||
template, | ||
precompile as precompiler, | ||
compile as compiler, | ||
defaultCompileOptions | ||
} from 'ember-glimmer-template-compiler'; | ||
import assign from 'ember-metal/assign'; | ||
|
||
export * from 'ember-glimmer-template-compiler'; | ||
export { removePlugin } from 'ember-glimmer-template-compiler/system/compile-options'; | ||
export const packageName = 'glimmer'; | ||
export const engineName = 'Glimmer'; | ||
|
||
export function precompile(string) { | ||
return template(precompiler(string)); | ||
} | ||
|
||
export function compile(string, options) { | ||
return compiler(string, assign({}, defaultCompileOptions(), options)); | ||
} |
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
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
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
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