How to use template files from sub templates folder?

Hi @trigger, welcome! What you want is a bit of broccoli code in your ember-cli-build.js. Ember uses broccoli as a major part of the build system to reduce your app from a tree of files into the final built assets via a series of transforms. Your use case is very simple, just you want to take some input templates and put them into a specific output location based on a flag.

There was actually a thread with a very similar question recently that might be worth checking out, as well as the docs for broccoli.js.

So you’re still ending up with a node script but it’s the “official” way to do stuff like this and should be much easier with broccoli than a lot of manual file management.

1 Like