This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests
David Taylor 33a2624f09
DEV: Introduce flag for compiling Plugin JS with Ember CLI (#17965)
When `EMBER_CLI_PLUGIN_ASSETS=1`, plugin application JS will be compiled via Ember CLI. In this mode, the existing `register_asset` API will cause any registered JS files to be made available in `/plugins/{plugin-name}_extra.js`. These 'extra' files will be loaded immediately after the plugin app JS file, so this should not affect functionality.

Plugin compilation in Ember CLI is implemented as an addon, similar to the existing 'admin' addon. We bypass the normal Ember CLI compilation process (which would add the JS to the main app bundle), and reroute the addon Broccoli tree into a separate JS file per-plugin. Previously, Sprockets would add compiled templates directly to `Ember.TEMPLATES`. Under Ember CLI, they are compiled into es6 modules. Some new logic in `discourse-boot.js` takes care of remapping the new module names into the old-style `Ember.TEMPLATES`.

This change has been designed to be a like-for-like replacement of the old plugin compilation system, so we do not expect any breakage. Even so, the environment variable flag will allow us to test this in a range of environments before enabling it by default.

A manual silence implementation is added for the build-time `ember-glimmer.link-to.positional-arguments` deprecation while we work on a better story for plugins.
2022-08-22 09:56:39 +01:00
..
acceptance DEV: Simplify "Editing a post stages new content" test (#18007) 2022-08-21 09:20:26 +02:00
fixtures UX: Make category section link icons consistent with Sidebar's interface (#17922) 2022-08-17 09:40:43 +08:00
helpers DEV: Remove widget-test helpers file (#18011) 2022-08-21 09:20:45 +02:00
integration DEV: Use async and sinon.resolves instead of rsvp (#18001) 2022-08-20 11:20:55 +02:00
unit DEV: implements removeKeys(predicate) in keyValueStore (#18019) 2022-08-21 19:19:25 +02:00
active-plugins.js.erb DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
core-tests.js DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
index.html DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
plugin-tests.js.erb DEV: Transpile all plugin js by default (#17175) 2022-06-21 22:07:10 +02:00
setup-tests.js DEV: Abort qunit tests when clicking in the toolbar (#17989) 2022-08-18 23:32:38 +01:00
test-boot-ember-cli.js DEV: Introduce flag for compiling Plugin JS with Ember CLI (#17965) 2022-08-22 09:56:39 +01:00