参与ember-cli-101教程,搜索显示其他人已发布此问题,但这一切都可以追溯到一年前和Ember 1.x.不过,我使用的是2.4.3。这是怎么回事。
bower install picnic --save
余烬-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();
};
应用/ 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
答案 0 :(得分:0)
并且修复是......在ember-cli-build.js中,你应该只为Picnic提供这一行
app.import('bower_components/picnic/picnic.min.css');
不再有plugins.min.css
个文件,picnic.min.css
位于Picnic的根目录中,而不是picnic/releases
。