Upgrading Ember inside of Ember-CLI

走远了吗. 提交于 2020-01-04 04:24:10

问题


I've just created a new Ember-CLI app (v0.1.12), and noticed that the referenced version of Ember is v1.8.1 (bower.json). I'd like to get the recently released 1.10 goodness in my project. What steps do I need to take to do this? (I'm new to Ember, Ember-CLI, Bower & NPM.)


回答1:


As per the release notes for Ember 1.10.0

To smoothly upgrade to 1.10 and HTMLBars, Ember-CLI users should update to a version at or after 0.1.12 and then remove their application's Handlebars dependency.

You can do this by following the steps below:

1) Delete your bower_components folder

2) run bower install --save ember#beta to get the latest beta of Ember (you can specify the version if you want a specific version)

3) run bower install to reinstall your bower dependencies

4) Uninstall handlebars: npm uninstall --save-dev broccoli-ember-hbs-template-compiler

5) Install HTMLbars: npm install --save-dev ember-cli-htmlbars




回答2:


In addition to the steps listed by Oren, you will want to make this change to your Brocfile.js so that you can remove the Handlebars dependency from your bower.json file as well:

var app = new EmberApp({
  vendorFiles: {
    'handlebars.js': null
  }
});

Source



来源:https://stackoverflow.com/questions/28441566/upgrading-ember-inside-of-ember-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!