Where to add css and js files in ember-cli app?

痴心易碎 提交于 2019-12-24 02:16:16

问题


In rails,

js files are located under

app/assets/javascripts 

Similarly where to add js and css files in ember-cli app ?


回答1:


app/styles/ should contain your stylesheets:

Contains your stylesheets, whether SASS, LESS, Stylus, Compass, or plain CSS
(though only one type is allowed, see Asset Compilation).
These are all compiled into <app-name>.css

If you need external JavaScript libraries, you should manage them in dependency sections of package.json and bower.json. You may have to include the assets manually in the build. This could be done by app.import() in ember-cli-build.js or by using ember-auto-import. Have a look in the User Guide for more details.

User Guide also contains a section about folder layout in ember-cli.



来源:https://stackoverflow.com/questions/36481541/where-to-add-css-and-js-files-in-ember-cli-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!