discourse/app/views
David Taylor 22a7905f2d
DEV: Allow Ember CLI assets to be used by development Rails app (#16511)
Previously, accessing the Rails app directly in development mode would give you assets from our 'legacy' Ember asset pipeline. The only way to run with Ember CLI assets was to run ember-cli as a proxy. This was quite limiting when working on things which are bypassed when using the ember-cli proxy (e.g. changes to `application.html.erb`). Also, since `ember-auto-import` introduced chunking, visiting `/theme-qunit` under Ember CLI was failing to include all necessary chunks.

This commit teaches Sprockets about our Ember CLI assets so that they can be used in development mode, and are automatically collected up under `/public/assets` during `assets:precompile`. As a bonus, this allows us to remove all the custom manifest modification from `assets:precompile`.

The key changes are:
- Introduce a shared `EmberCli.enabled?` helper
- When ember-cli is enabled, add ember-cli `/dist/assets` as the top-priority Rails asset directory
- Have ember-cli output a `chunks.json` manifest, and teach `preload_script` to read it and append the correct chunks to their associated `afterFile`
- Remove most custom ember-cli logic from the `assets:precompile` step. Instead, rely on Rails to take care of pulling the 'precompiled' assets into the `public/assets` directory. Move the 'renaming' logic to runtime, so it can be used in development mode as well.
- Remove fingerprinting from `ember-cli-build`, and allow Rails to take care of things

Long-term, we may want to replace Sprockets with the lighter-weight Propshaft. The changes made in this commit have been made with that long-term goal in mind.

tldr: when you visit the rails app directly, you'll now be served the current ember-cli assets. To keep these up-to-date make sure either `ember serve`, or `ember build --watch` is running. If you really want to load the old non-ember-cli assets, then you should start the server with `EMBER_CLI_PROD_ASSETS=0`. (the legacy asset pipeline will be removed very soon)
2022-04-21 16:26:34 +01:00
..
about FIX: Support Ruby 3 keyword arguments 2021-10-05 11:25:00 -04:00
admin/backups FEATURE: further restrict downloading of backups 2017-03-01 08:28:34 -07:00
application FIX: Offer site_logo_dark_url as an option for dark mode themes (#14361) 2021-09-16 17:47:51 -04:00
badges FIX: in case of orphan user records skip badge 2019-08-30 17:21:34 +10:00
categories FIX: Resolve Schema.org validation issues 2020-05-05 16:57:16 +03:00
common Code review comments. 2021-06-21 11:06:58 +08:00
default FIX: Add a title to the groups pages 2016-07-25 14:24:43 -04:00
email FEATURE: Add email dark mode (#16104) 2022-04-11 12:27:50 -05:00
embed FIX: Ensure embedded replies/reply-to links open in _blank (#14597) 2021-10-13 21:34:30 +01:00
exceptions FIX: Hide empty popular/recent sections in 404 page (#10811) 2020-10-02 15:11:15 -04:00
finish_installation Upgrade to FontAwesome 5 (take two) (#6673) 2018-11-26 16:49:57 -05:00
groups FEATURE: add title tag for group detail page (#13702) 2021-07-12 20:05:57 +05:30
invites UX: updated "accept invite" error page (#15490) 2022-01-09 10:21:42 +05:30
layouts DEV: Allow Ember CLI assets to be used by development Rails app (#16511) 2022-04-21 16:26:34 +01:00
list FEATURE: add nofollow to RSS alternate link in topics and categories (#16013) 2022-03-09 16:34:02 +11:00
metadata DEV: Add support for Rails 6 2019-05-02 16:23:25 +10:00
offline UX: Remove Helvetica from our font stack (#11876) 2021-02-05 17:01:21 -05:00
posts FEATURE: use canonical links in posts.rss feed (#16190) 2022-03-15 20:17:06 +11:00
published_pages FIX: use normal logo in published pages if small not available. 2020-09-21 09:20:39 +05:30
qunit DEV: Allow Ember CLI assets to be used by development Rails app (#16511) 2022-04-21 16:26:34 +01:00
robots_txt FEATURE: Let sites add a sitemap.xml file. (#16357) 2022-04-12 10:33:59 -03:00
safe_mode Upgrade to FontAwesome 5 (take two) (#6673) 2018-11-26 16:49:57 -05:00
search UX: better title on search page 2017-10-27 09:13:04 +05:30
session FEATURE: Rename 'Discourse SSO' to DiscourseConnect (#11978) 2021-02-08 10:04:33 +00:00
sitemap FEATURE: Let sites add a sitemap.xml file. (#16357) 2022-04-12 10:33:59 -03:00
static FEATURE: Allow to modify topic-backed static pages (#15324) 2021-12-16 04:24:11 +01:00
tags FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
topics FEATURE: use canonical links in posts.rss feed (#16190) 2022-03-15 20:17:06 +11:00
user_api_keys FEATURE: Delegated authentication via user api keys (#7272) 2019-04-01 13:18:53 -04:00
user_notifications FIX: Email styles for Gmail app dark mode (#16482) 2022-04-14 15:03:06 -04:00
users DEV: Allow Ember CLI assets to be used by development Rails app (#16511) 2022-04-21 16:26:34 +01:00
users_email DEV: Hash tokens stored from email_tokens (#14493) 2021-11-25 09:34:39 +02:00
wizard Code review comments. 2021-06-21 11:06:58 +08:00