如何使用凉亭下载ember金丝雀版本

时间:2014-03-16 23:17:58

标签: ember.js bower

我想在Ember中使用query-params功能。但是,要做到这一点,我需要下载ember的canary版本。我正在使用bower进行包管理。如何更新我的bower.json文件以下载最新的Ember版本的canary版本。我的bower.json文件的相关部分如下所示:

{
  "dependencies": {
    "sass-bootstrap": "~2.3.0",
    "requirejs": "~2.1.4",
    "modernizr": "~2.6.2",
    "jquery": "~1.9.1",
    "requirejs-text": "~2.0.7",
    "ember": "http://builds.emberjs.com/canary/ember.js",
    "ember-prod": "http://builds.emberjs.com/canary/ember.prod.js",
    "datatables": "~1.9.4",
    "lodash": "~1.3.1",
    "font-awesome": "~3.2.1",
    "moment": "~2.1.0",
    "d3": "~3.2.6",
    "ember-model": "~0.0.7",
    "jquery-ui": "~1.10.3",
    "typeahead.js": "~0.10.1"
  },
  "devDependencies": {},
  "resolutions": {
    "jquery": ">=1.8.0",
  }
}

然而," bower install ember"没有告诉我以下内容:

Unable to find a suitable version for ember, please choose one:
1) ember#* which resolved to e-tag:8ee2c1ef5 and has ember-table-shim#0.2.0, nvwebapp as dependants
2) ember#~1.0 which resolved to 1.0.1 and has ember-model#0.0.11 as dependants

如果我选择第一个分辨率,然后转到app / bower_components / ember / index.js文件,可以在文件顶部看到以下内容:

/*!
 * @overview  Ember - JavaScript Application Framework
 * @copyright Copyright 2011-2014 Tilde Inc. and contributors
 *            Portions Copyright 2006-2011 Strobe Inc.
 *            Portions Copyright 2008-2011 Apple Inc. All rights reserved.
 * @license   Licensed under MIT license
 *            See https://raw.github.com/emberjs/ember.js/master/LICENSE
 * @version   1.4.1+pre.af87bd20
 */

所以,似乎这是下载版本1.4.1,但最新的金丝雀版本是1.6.0。

我应该如何更新我的bower.json文件以获取最新的金丝雀版本?

提前致谢.. !!

2 个答案:

答案 0 :(得分:4)

来源:http://www.ember-cli.com/user-guide/#using-canary-build-instead-of-release

使用canary build而不是release

bower.json而不是版本号中使用:

"ember": "components/ember#canary",

并且,依赖关系后添加分辨率:

"resolutions": {
  "ember": "canary"
}

这也可以应用于Ember数据:

"ember-data": "components/ember-data#canary",

并且,添加到决议:

"resolutions": {
  "ember-data": "canary"
}

清除供应商目录,然后运行npm install && bower install

答案 1 :(得分:1)

您可以通过仅指定内部版本号来启用canary构建,如下所示 - " ember":" 1.4.0-beta.2"

我正在使用beta.2查询参数。 您还需要明确启用此功能。