-
Notifications
You must be signed in to change notification settings - Fork 123
Migration from 0.14.13 to 0.14.14
0.14.14
release extracted a few things.
To update cli, do
npm install -g amber-cli
This should reinstall amber-cli
with the newest project template.
Packages Web
and Wrappers-JQuery
are no longer automatic dependencies
of the newly created projects; it is recommended to remove them form deploy.js
of legacy projects as well and using imports instead:
- for a package that subclasses
Widget
, you need not to do anything (as it hasWeb
as implicit dependency via subclassing), this package can use all ofWeb
as well as all of jQuery wrapper API, as it is dependency ofWeb
; - in Helios, in a template of a package that uses
Web
(maybe along with jQuery wrapper API), but does not subclassWidget
, you should add'amber/web/Web'
intoimports: {...}
dynamic array argument; - in Helios, in a template of a package that does not use
Web
but usesasJQuery
selector and/or 'JQuery current' to get tojQuery
object to do other API, likeajax:
, you should add'amber/jquery/Wrappers-JQuery'
intoimports: {...}
dynamic array argument.
Do the above changes in your previous version, before upgrading[1]. When updating imports:
line, don't forget to save and commit, even if the package does not appear to be dirty (it is known bug in Helios).
To update your projects, do
bower install "amber#^0.14.14" --save
bower install "helios#>=0.5.0" --save-dev
bower install "amber-contrib-legacy#>=0.2.1" --save-dev
npm install "amber-dev@^0.5.0" --save-dev
# If you used Web package
bower install amber-contrib-web --save
# If you used 'JQuery current' or 'asJQuery' message
bower install amber-contrib-jquery --save
grunt devel
You don't need to install amber-contrib-jquery
if you installed amber-contrib-web
, as the former is the dependency of the latter. If you used Web
package somewhere in your app, you likely have 'bower_components/amber/contrib/src'
in Gruntfile.js
library directories section. You must change it to new place where Web
package is located now: 'bower_components/amber-contrib-web/src'
.
Things that were extracted:
-
Web
into its own repo -
Wrappers-JQuery
into its own repo - UI dialogs from
PlatformInterface
toTerminal
class, - JS platform bridge from
PlatformInterface
toPlatform
class.
The whole PlatformInterface
class is deprecated, look at List of deprecations or JS console with deprecation messages to learn what to use instead.
[1] You can change imports after you alredy upgraded to 0.14.14, but problems may arise from suddenly missing Web
and/or Wrappers-JQuery
while loading an app. You can overcome this by adding 'amber/web/Web'
into deploy.js
temporarily, load an app gracefully, edit the imports:
lines and removing 'amber/web/Web
' from deploy.js
.