简体   繁体   English

Ember Brocfile不导入JS和CSS文件

[英]Ember Brocfile does not import JS and CSS files

I have an Ember CLI application. 我有一个Ember CLI应用程序。 I am trying to add the BeatPicker jQuery datepickers to my application using app.import() in the Brocfile but they don't seem to be getting included in vendor.js and vendor.css. 我正在尝试使用app.import()将BeatPicker jQuery datepickers添加到我的应用程序中,但是它们似乎并没有包含在vendor.js和vendor.css中。 I installed BeatPicker through Bower and see that the files are in bower_components folder. 我通过Bower安装了BeatPicker ,并看到文件位于bower_components文件夹中。 I am also using retina.js and that seems to get compiled into vendor.js. 我也在使用retina.js,而且似乎已编译到vendor.js中。 I am not sure why BeatPicker is not getting compiled. 我不确定BeatPicker为什么没有被编译。 Here is a copy of my Brocfile: 这是我的Brocfile的副本:

/* jshint node: true */
/* global require, module */

var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

var app = new EmberAddon({
  babel: {
    includePolyfill: true
  }
});

// Retina.js
app.import('bower_components/retinajs/dist/retina.min.js');

// BeatPicker
app.import('bower_components/BeatPicker/build-0.1.3/css/BeatPicker.min.css');
app.import('bower_components/BeatPicker/build-0.1.3/js/BeatPicker.min.js');

module.exports = app.toTree();

Even the paths are correct. 即使路径是正确的。 What am I missing? 我想念什么?

Since v1.13 of ember-cli, Brocfile.js has been deprecated in favor of ember-cli-build.js . 从ember-cli v1.13 Brocfile.js开始,不推荐使用Brocfile.js ,而推荐使用ember-cli-build.js See the transition doc for more info on why they made the change. 有关为什么进行更改的更多信息,请参见过渡文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM