📜 ⬆️ ⬇️

Release Cordova 5.2.0

Today Apache Cordova has released a new release - 5.2.0.

The main changes in this release are


Also much more emphasis is placed on using NPM instead of the own registry of plug-ins.
')
More under the cut.

There will also be some upcoming releases and documentation questions.


I think we should start with

npm -g install cordova

--Browserify flag support


Now there is full support --browserify and it's official. All tests passed and hypothetically it works. Since this functionality has been in the main branch for a long time, most likely it does, it still works.
For developers, this means that all the plugins are collected in one file, which means fewer delays with initialization, and the application will load a little faster. Also, when building using browserify, in addition to plug-ins and a common code for all platforms, there is part of the cordova.js functionality that depends on only one platform, which allows Cordova developers to publish fixes that affect one platform faster and to get the update you just need to update the platform to new version. It also allows you to make patch releases, for those who are not ready to quickly go to a brighter future.

usage example

cordova run android --browserify

To better understand what is happening, you can do the following

create a test application
 cordova create browserifytest cd browserifytest cordova plugin add cordova-plugin-console cordova plugin add cordova-plugin-device 


After that, start the application first as cordova run android connect to the application via chrome and see which files are displayed in the Source tab, then run the application as cordova run android --browserify and see the difference.

Windows support in plugman



Here I was sure that it was before, but apparently not. Now the plugman supports work with all major platforms, and this means that you can have more customized versions of Cordova applications also on the Windows platform (so that you would not think about it). This allowed the plugman to get version 1.0, so there are only improvements ahead.

New clean command



Perhaps this does not require a detailed description, but now you can remove all the compiled trash for the project. just follow

cordova clean

Of course, you can execute this command individually for each of the installed platforms.

cordova clean android
or
cordova clean ios

Using ~ instead of ^ by default in config.xml when using --save



Now when you save the platform using the --save flag in config.xml, the version is written in the form ~ 4.1.0, which allows you to get a version with a later patch version when restoring the platform. Due to the fact that several vulnerabilities were found in Cordova over the past year, this change allows for more rapid release of security updates, and there is no need to update Cordova’s tools with the vulnerable platform. Also, when using automatic build, security updates will be automatically applied, and you will not need to update the config.xml

What awaits us ahead


We have several new releases of platforms ahead of us, the most interesting from my point of view will be an update of the Browser platform which will return the ability to run the web server with the assembled application. Let's wait and see how convenient it will be. There will also be a patch release for iOS and a new release of the Windows platform. I don’t closely follow the changes there, but if all three platforms come out at about the same time, I’ll try to write separately about these releases.

Documentation and questions


From my point of view, the Cordova documentation is in a state of how everything is there, but sometimes you will not find what you need. I would very much like to improve this state, and there are certain considerations in this direction, but I would like to know the opinion of the people who work with Cordova.

I am interested in both Russian and English versions of the documentation, if you write your wishes in the comments, I will try to make them appear in the next release of Cordova.

A few links:
Apache cordova

Russian documentation Apache Cordova
Apache Cordova English Documentation

Source: https://habr.com/ru/post/264789/


All Articles