0
votes

I have an express.js application that uses ember on the front-end. Currently, my structure is:

+ client/
| + ember-app
+ server/
    + express.js
    + public/
    | + assets/
    + views/
    | + index.ejs

I've gotten my Ember app to build into the public folder under the express app and I can even change the name if I like but I can't seem to get to change the destination of just the index.ejs to go under the views folder.

So far this is all the documentation I can find on changing the name and destination. Ember-Cli User Guide

1
Are you open to adding a gulp task to call ember build and afterward to copy or move index.ejs to the views folder? - Paul Oliver
It looks like that may be the only resolution here. I was looking for an Ember way instead or introducing gulp (or any other build tool) to the build process. Thanks @PaulOliver - Kenneth Kogi

1 Answers

1
votes

Check out the documentation for ember-cli: https://ember-cli.com/user-guide/#configuring-output-paths

In your ember-cli-build.js file you can change the destination of most of the generated files:

// ember-cli-build.js
var app = new EmberApp({
  outputPaths: {
    app: {
      html: 'index.html',
      css: {
        'app': '/assets/application-name.css'
      },
      js: '/assets/application-name.js'
    },
    vendor: {
      css: '/assets/vendor.css',
      js: '/assets/vendor.js'
    }
  }
});

Change the app.html is where you will have to experiment.