discourse/spec
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
..
fabricators DEV: Add messages tab to the new user menu (#17850) 2022-08-10 08:25:39 +03:00
fixtures FEATURE: Add support for case-sensitive Watched Words (#17445) 2022-08-02 10:06:03 +02:00
helpers DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
import_export DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
initializers Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
integration DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
integrity DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
jobs DEV: Enable new user menu when experimental sidebar hamburger is enabled (#18133) 2022-08-31 21:15:01 +03:00
lib DEV: Use DiscourseJsProcessor for theme template compilation (#18135) 2022-09-01 11:50:46 +01:00
mailers DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
models DEV: Use DiscourseJsProcessor for theme template compilation (#18135) 2022-09-01 11:50:46 +01:00
multisite DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
requests FIX: Keep private theme key secret from user (#18106) 2022-09-01 13:15:23 +03:00
script/import_scripts DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
serializers FEATURE: anonymous sidebar categories and tags (#18038) 2022-08-23 16:20:46 +08:00
services FIX: Do not notify admins watching PM tags (#18103) 2022-08-29 16:11:11 +03:00
support DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
tasks FEATURE: Create upload_references table (#16146) 2022-06-09 09:24:30 +10:00
views Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
rails_helper.rb DEV: Apply Rails 6.1 defaults 2022-05-24 17:13:44 +02:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Fix openapi definition logo URL (#17038) 2022-06-08 13:10:20 +01:00