I'm making a Rails engine that has an /admin route. I'd like to create this admin interface with Ember CLI.
I know rails will automatically precompile any static JS/CSS that live in my engine's lib dir, and only load them when the parent application mounts my engine and visits that route. However, I'd like to use Ember CLI to build the admin interface.
What would be a good way to do this? Ideally I'd like to keep Ember CLI builds out of the repo.
My solution involved storing a build of the Ember CLI app in the engine.
I wrote a rake task that runs
ember buildand moves the staticdistinto thepublic/my-enginedirectory, and merges those public static assets with the host app's public folder.Here's the task for our particular project: