我是 js 包管理器和构建工具的新手,所以这对我来说似乎有点困惑。
我已经设置了一个新的 ember 应用程序,我想以推荐/常规方式添加依赖项(基础)。似乎有两种方法可以将其添加到您的项目中,使用凉亭或西兰花。
本页推荐使用西兰花:
If you want to use the .scss version of Foundation, you should first configure your project to use broccoli-sass with:
npm install --save-dev broccoli-sass
and then rename your app/styles/app.css to app/styles/app.scss.
Then you can install Foundation using Bower with:
bower install --save-dev foundation
Now, inside your app/styles/app.scss, you can import the Foundation styles with:
@import 'bower_components/foundation/scss/normalize';
@import 'bower_components/foundation/scss/foundation';
而这建议使用凉亭。
$> bower install --save bootstrap
Afterwards add following two lines to your ember-cli-builds.js (or Brocfile.js if you are using an older version of Ember.js):
app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
有人可以阐明这些之间的区别以及哪个是更好/推荐的方式吗?