正在编写ember-cli-101教程,搜索显示其他人也发布了这个问题,但这一切都可以追溯到一年前和Ember 1.x。不过,我使用的是2.4.3。事情的进展是这样的。
bower install picnic --save
ember-cli-build.js:
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
});
app.import('bower_components/picnic/releases/plugins.min.css');
app.import('bower_components/picnic/releases/picnic.min.css');
return app.toTree();
};app/index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Borrowers</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{content-for "head"}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/borrowers.css">
{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}
<script src="assets/vendor.js"></script>
<script src="assets/borrowers.js"></script>
{{content-for "body-footer"}}
</body>
</html>正在启动服务器....
$ ember server --proxy http://api.ember-cli-101.com
version: 2.4.2
Proxying to http://api.ember-cli-101.com
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
The Broccoli Plugin: [SimpleConcat: Concat: Vendor Styles/assets/vendor.css] failed with:
Error: ENOENT: no such file or directory发布于 2016-04-10 03:47:53
解决办法是..。在ember-cli-build.js中,应该只有这一行对应于Picnic
app.import('bower_components/picnic/picnic.min.css');不再有plugins.min.css文件,并且picnic.min.css位于Picnic的根目录中,而不是picnic/releases中。
https://stackoverflow.com/questions/36364076
复制相似问题