How to compile files before ember creates ember-app.js file


i want to create an application which has to take files from outside the application for a particular route and add those route template and controller to the application… is this possible in ember


What you’re asking isn’t very clear, maybe you want to reword it.


Yes, this is possible. You would do it by customizing ember-cli-build.js something like this:

var stew = require('broccoli-stew');
var mergeTrees = require('broccoli-merge-trees');
module.exports = function(defaults) {
  return new EmberApp(defaults, {
    trees: {
      app: mergeTrees(['app', stew.find('/some-other-path', '*.js')])

This is merging some extra stuff into the “app” tree, which means it’s equivalent to dropping files under your “app” directory.