As you said, the dependencies you declare in your bower.json and package.json get downloaded to bower_components
and node_modules
When you do you an ember build
command what happens is that all the code you decide to import in your ember-cli-build.js
will get dumped to the vendor.js
/ vendor.css
file. All your application code (templates/routes/components/controllers/services) will be placed in my-app-name.js
. All your application styles will go to the my-app-name.css
file. All these files will be placed in the dist
directory so that you can deploy it.
See this sample ember-cli-build.js
file:
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
//CSS - Content of these files will go to "vendor.css"
app.import('vendor/css/bootstrap.css');
app.import('bower_components/datatables/media/css/jquery.dataTables.css');
app.import('bower_components/datatables/media/css/dataTables.bootstrap.css');
app.import('vendor/css/plugins/toastr/toastr.min.css');
// Javascript - Content of these files will go to "vendor.js"
app.import('vendor/js/bootstrap.js');
app.import('vendor/js/plugins/metisMenu/jquery.metisMenu.js');
app.import('vendor/js/plugins/toastr/toastr.min.js');
app.import('bower_components/datatables/media/js/jquery.dataTables.js');
return app.toTree();
};
The CSS imports will go to the vendor.css
file and the JS imports will go to the vendor.js
files.
The content of your my-app-name.css
comes from the app/styles
folder.
If you do ember build --environment production
the ember build process will also fingertring your assets (append a hash at the end of the filename and generate an appropriate reference in the index.html file).