discourse/app/assets/javascripts/discourse-common
David Taylor 7e74dd0afe
DEV: Use DiscourseJsProcessor for theme template compilation (#18135)
Previously we were relying on a highly-customized version of the unmaintained Barber gem for theme template compilation. This commit switches us to use our own DiscourseJsProcessor, which makes use of more modern patterns and will be easier to maintain going forward.

In summary:
- Refactors DiscourseJsProcessor to move multiline JS heredocs into a companion `discourse-js-processor.js` file
- Use MiniRacer's `.call` method to avoid manually escaping JS strings
- Move Theme template AST transformers into DiscourseJsProcessor, and formalise interface for extending RawHandlebars AST transformations
- Update Ember template compilation to use a babel-based approach, just like Ember CLI. This gives each template its own ES6 module rather than directly assigning `Ember.TEMPLATES` values
- Improve testing of template compilation (and move some tests from `theme_javascript_compiler_spec.rb` to `discourse_js_processor_spec.rb`
2022-09-01 11:50:46 +01:00
..
addon DEV: Use DiscourseJsProcessor for theme template compilation (#18135) 2022-09-01 11:50:46 +01:00
app DEV: Make `discourse-common` an Ember addon. (#9578) 2020-04-29 12:18:21 -04:00
config DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
tests DEV: Make addons buildable on their own (#17205) 2022-06-23 22:19:54 +02:00
vendor DEV: Make `discourse-common` an Ember addon. (#9578) 2020-04-29 12:18:21 -04:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
index.js REFACTOR: Support bundling our `admin` section as an ember addon 2020-09-22 15:14:29 -04:00
package.json DEV: Update `@embroider/test-setup` (#17625) 2022-07-24 17:29:21 +02:00