-
-
Notifications
You must be signed in to change notification settings - Fork 66
Move template compiler creation to a method on the addon #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rwjblue
merged 14 commits into
ember-cli:master
from
chriseppstein:extract-template-compiler-method
Jun 25, 2020
Merged
Changes from 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
270d635
Move template compiler creation to a method on the addon so it can be…
chriseppstein ee16a5c
Fix error in type definition file.
chriseppstein fadcaf2
fix: Lint error.
chriseppstein 8a8a616
Upgrade to broccoli-persistent-filter version 3.0.
chriseppstein 7a6d882
Document how to inherit/extend the broccoli-tree within an addon.
chriseppstein c904853
Merge remote-tracking branch 'ember-cli/master' into extract-template…
chriseppstein 15fa68e
Remove unrelated typescript types.
chriseppstein d659dbf
Revert "Document how to inherit/extend the broccoli-tree within an ad…
chriseppstein be1f31b
Rename method to transpileTree per code review feedback.
chriseppstein 7a9c052
Add tests for transpileTree.
chriseppstein b526d5c
Merge remote-tracking branch 'ember-cli/master' into extract-template…
chriseppstein 7b97810
Fix lint errors.
chriseppstein da3250f
Remove debbug logging.
chriseppstein 9fb94bd
Upgrade to latest broccoli-persistent-filter (fixes typescript issues).
chriseppstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import Filter = require('broccoli-persistent-filter'); | ||
chriseppstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| import type { ASTPluginBuilder } from '@glimmer/syntax'; | ||
| import type { InputNode } from 'broccoli-node-api'; | ||
| // This is a hack to get access to the abstract Filter parameters which aren't exported. | ||
| declare class Foo extends Filter { } | ||
| type PluginOptions = ConstructorParameters<typeof Foo>[1]; // this should be exported by the main import. | ||
| declare namespace TemplateCompiler { | ||
| interface HtmlBarsOptions extends PluginOptions { | ||
| plugins?: { | ||
| ast?: Array<ASTPluginBuilder> | ||
| }; | ||
| } | ||
| } | ||
| declare class TemplateCompiler extends Filter { | ||
| public extensions: ['hbs', 'handlebars']; | ||
| public targetExtension: 'js'; | ||
| constructor(inputTree: InputNode, options: TemplateCompiler.HtmlBarsOptions); | ||
| registeredASTPlugins(): Array<ASTPluginBuilder>; | ||
| unregisterPlugins(): void; | ||
| baseDir(): string; | ||
| optionsHash(): string; | ||
| } | ||
| export = TemplateCompiler; | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -1541,6 +1541,19 @@ async-disk-cache@^1.2.1: | |
| rsvp "^3.0.18" | ||
| username-sync "^1.0.2" | ||
|
|
||
| async-disk-cache@^2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.yarnpkg.com/async-disk-cache/-/async-disk-cache-2.0.0.tgz#71bd47706ffa323de3677ebe1f55f8c92e90768f" | ||
| integrity sha512-lczEl6qJmyZXfTM4K9WG7s6vpjfJpdl1T5tbYeT5Q8Jp4z5TMjixYdFkIYmH4Y+6ZsG8ZYYdT6PSwkoVvGE5ag== | ||
| dependencies: | ||
| debug "^4.1.1" | ||
| heimdalljs "^0.2.3" | ||
| istextorbinary "^2.5.1" | ||
| mkdirp "^0.5.0" | ||
| rimraf "^3.0.0" | ||
| rsvp "^4.8.5" | ||
| username-sync "^1.0.2" | ||
|
|
||
| async-limiter@~1.0.0: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" | ||
|
|
@@ -2271,6 +2284,11 @@ binary-extensions@^2.0.0: | |
| resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.2.tgz#c83c3d74233ba7674e4f313cb2a2b70f54e94b7c" | ||
| integrity sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg== | ||
|
|
||
| binaryextensions@^2.1.2: | ||
| version "2.2.0" | ||
| resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.2.0.tgz#e7c6ba82d4f5f5758c26078fe8eea28881233311" | ||
| integrity sha512-bHhs98rj/7i/RZpCSJ3uk55pLXOItjIrh2sRQZSM6OoktScX+LxJzvlU+FELp9j3TdcddTmmYArLSGptCTwjuw== | ||
|
|
||
| blank-object@^1.0.1: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/blank-object/-/blank-object-1.0.2.tgz#f990793fbe9a8c8dd013fb3219420bec81d5f4b9" | ||
|
|
@@ -2663,7 +2681,7 @@ broccoli-persistent-filter@^1.1.6, broccoli-persistent-filter@^1.4.3: | |
| symlink-or-copy "^1.0.1" | ||
| walk-sync "^0.3.1" | ||
|
|
||
| broccoli-persistent-filter@^2.1.0, broccoli-persistent-filter@^2.2.1, broccoli-persistent-filter@^2.3.0, broccoli-persistent-filter@^2.3.1: | ||
| broccoli-persistent-filter@^2.1.0, broccoli-persistent-filter@^2.2.1, broccoli-persistent-filter@^2.3.0: | ||
| version "2.3.1" | ||
| resolved "https://registry.yarnpkg.com/broccoli-persistent-filter/-/broccoli-persistent-filter-2.3.1.tgz#4a052e0e0868b344c3a2977e35a3d497aa9eca72" | ||
| integrity sha512-hVsmIgCDrl2NFM+3Gs4Cr2TA6UPaIZip99hN8mtkaUPgM8UeVnCbxelCvBjUBHo0oaaqP5jzqqnRVvb568Yu5g== | ||
|
|
@@ -2683,6 +2701,24 @@ broccoli-persistent-filter@^2.1.0, broccoli-persistent-filter@^2.2.1, broccoli-p | |
| sync-disk-cache "^1.3.3" | ||
| walk-sync "^1.0.0" | ||
|
|
||
| broccoli-persistent-filter@^3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/broccoli-persistent-filter/-/broccoli-persistent-filter-3.0.0.tgz#497e054e2c3bf9b7b360b8a50e7707078d39fed6" | ||
| integrity sha512-XdrtZ7K3zY0cyCg8XNTqoESdVqtFQUh1lSn7xkzaJxL4PTFjmzEtscvm6AoKQJ7rTzBBhER4rAzgqPKsy9/VIA== | ||
| dependencies: | ||
| async-disk-cache "^2.0.0" | ||
| async-promise-queue "^1.0.3" | ||
| broccoli-plugin "^4.0.3" | ||
| fs-tree-diff "^2.0.0" | ||
| hash-for-dep "^1.5.0" | ||
| heimdalljs "^0.2.1" | ||
| heimdalljs-logger "^0.1.7" | ||
| mkdirp "^0.5.1" | ||
| promise-map-series "^0.2.1" | ||
| rimraf "^3.0.0" | ||
| symlink-or-copy "^1.0.1" | ||
| sync-disk-cache "^2.0.0" | ||
|
|
||
| broccoli-plugin@^1.0.0, broccoli-plugin@^1.2.0, broccoli-plugin@^1.2.1, broccoli-plugin@^1.3.0: | ||
| version "1.3.1" | ||
| resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-1.3.1.tgz#a26315732fb99ed2d9fb58f12a1e14e986b4fabd" | ||
|
|
@@ -2716,6 +2752,19 @@ broccoli-plugin@^4.0.1, broccoli-plugin@^4.0.2, broccoli-plugin@^4.0.3: | |
| rimraf "^3.0.0" | ||
| symlink-or-copy "^1.3.0" | ||
|
|
||
| broccoli-plugin@^4.0.3: | ||
| version "4.0.3" | ||
| resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-4.0.3.tgz#9dcfbfb6a1b27a37cc22e65c071719ce9f92bc1e" | ||
| integrity sha512-CtAIEYq5K+4yQv8c/BHymOteuyjDAJfvy/asu4LudIWcMSS7dTn3yGI5gNBkwHG+qlRangYkHJNVAcDZMQbSVQ== | ||
| dependencies: | ||
| broccoli-node-api "^1.6.0" | ||
| broccoli-output-wrapper "^3.2.1" | ||
| fs-merger "^3.1.0" | ||
| promise-map-series "^0.2.1" | ||
| quick-temp "^0.1.3" | ||
| rimraf "^3.0.0" | ||
| symlink-or-copy "^1.3.0" | ||
|
|
||
| broccoli-slow-trees@^3.0.1: | ||
| version "3.0.1" | ||
| resolved "https://registry.yarnpkg.com/broccoli-slow-trees/-/broccoli-slow-trees-3.0.1.tgz#9bf2a9e2f8eb3ed3a3f2abdde988da437ccdc9b4" | ||
|
|
@@ -3791,6 +3840,14 @@ editions@^1.1.1: | |
| resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" | ||
| integrity sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg== | ||
|
|
||
| editions@^2.2.0: | ||
| version "2.3.0" | ||
| resolved "https://registry.yarnpkg.com/editions/-/editions-2.3.0.tgz#47f2d5309340bce93ab5eb6ad755b9e90ff825e4" | ||
| integrity sha512-jeXYwHPKbitU1l14dWlsl5Nm+b1Hsm7VX73BsrQ4RVwEcAQQIPFHTZAbVtuIGxZBrpdT2FXd8lbtrNBrzZxIsA== | ||
| dependencies: | ||
| errlop "^2.0.0" | ||
| semver "^6.3.0" | ||
|
|
||
| [email protected]: | ||
| version "1.1.1" | ||
| resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" | ||
|
|
@@ -4365,6 +4422,11 @@ err-code@^1.0.0: | |
| resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" | ||
| integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= | ||
|
|
||
| errlop@^2.0.0: | ||
| version "2.2.0" | ||
| resolved "https://registry.yarnpkg.com/errlop/-/errlop-2.2.0.tgz#1ff383f8f917ae328bebb802d6ca69666a42d21b" | ||
| integrity sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw== | ||
|
|
||
| error-ex@^1.3.1: | ||
| version "1.3.2" | ||
| resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" | ||
|
|
@@ -5170,6 +5232,18 @@ fs-merger@^3.1.0: | |
| rimraf "^2.6.3" | ||
| walk-sync "^2.0.2" | ||
|
|
||
| fs-merger@^3.1.0: | ||
| version "3.1.0" | ||
| resolved "https://registry.yarnpkg.com/fs-merger/-/fs-merger-3.1.0.tgz#f30f74f6c70b2ff7333ec074f3d2f22298152f3b" | ||
| integrity sha512-RZ9JtqugaE8Rkt7idO5NSwcxEGSDZpLmVFjtVQUm3f+bWun7JAU6fKyU6ZJUeUnKdJwGx8uaro+K4QQfOR7vpA== | ||
| dependencies: | ||
| broccoli-node-api "^1.7.0" | ||
| broccoli-node-info "^2.1.0" | ||
| fs-extra "^8.0.1" | ||
| fs-tree-diff "^2.0.1" | ||
| rimraf "^2.6.3" | ||
| walk-sync "^2.0.2" | ||
|
|
||
| fs-minipass@^2.0.0: | ||
| version "2.1.0" | ||
| resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" | ||
|
|
@@ -6424,6 +6498,15 @@ [email protected]: | |
| editions "^1.1.1" | ||
| textextensions "1 || 2" | ||
|
|
||
| istextorbinary@^2.5.1: | ||
| version "2.6.0" | ||
| resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.6.0.tgz#60776315fb0fa3999add276c02c69557b9ca28ab" | ||
| integrity sha512-+XRlFseT8B3L9KyjxxLjfXSLMuErKDsd8DBNrsaxoViABMEZlOSCstwmw0qpoFX3+U6yWU1yhLudAe6/lETGGA== | ||
| dependencies: | ||
| binaryextensions "^2.1.2" | ||
| editions "^2.2.0" | ||
| textextensions "^2.5.0" | ||
|
|
||
| isurl@^1.0.0-alpha5: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" | ||
|
|
@@ -7279,7 +7362,8 @@ mocha@^7.1.2: | |
| yargs-unparser "1.6.0" | ||
|
|
||
| "module-name-inliner@link:./tests/dummy/lib/module-name-inliner": | ||
| version "0.1.0" | ||
| version "0.0.0" | ||
| uid "" | ||
|
|
||
| morgan@^1.9.1: | ||
| version "1.9.1" | ||
|
|
@@ -9345,6 +9429,17 @@ sync-disk-cache@^1.3.3: | |
| rimraf "^2.2.8" | ||
| username-sync "^1.0.2" | ||
|
|
||
| sync-disk-cache@^2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.yarnpkg.com/sync-disk-cache/-/sync-disk-cache-2.0.0.tgz#27a6490132424d6b7a766788176168e74a14dde5" | ||
| integrity sha512-2WtxRtXHoOxK7V48pOZaZnSBktAm1IDWZUJoK6fAeRzkjJkvBp8H3uHNjnBmhWYirfFZulJ+wuDv71znbfFGSA== | ||
| dependencies: | ||
| debug "^4.1.1" | ||
| heimdalljs "^0.2.6" | ||
| mkdirp "^0.5.0" | ||
| rimraf "^3.0.0" | ||
| username-sync "^1.0.2" | ||
|
|
||
| table@^5.2.3: | ||
| version "5.4.6" | ||
| resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" | ||
|
|
@@ -9433,6 +9528,11 @@ text-table@^0.2.0: | |
| resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.5.0.tgz#e21d3831dafa37513dd80666dff541414e314293" | ||
| integrity sha512-1IkVr355eHcomgK7fgj1Xsokturx6L5S2JRT5WcRdA6v5shk9sxWuO/w/VbpQexwkXJMQIa/j1dBi3oo7+HhcA== | ||
|
|
||
| textextensions@^2.5.0: | ||
| version "2.6.0" | ||
| resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" | ||
| integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== | ||
|
|
||
| thenify-all@^1.0.0: | ||
| version "1.6.0" | ||
| resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.