Description
Is your feature request related to a problem? Please describe.
In 6.0.0 release, we'll have new requirements for applications build process, i.e. all apps must have webpack as dependencies, several development plugins should be replaced with others, etc.
All of these changes could take a lot of time to the users and several issues might occur during the process. So it will be great in case tns update
command can handle all these changes.
Describe the solution you'd like
The tns update
command should update the following components of the application:
- runtime versions
tns-core-modules
andtns-core-modules-widgets
versionsnativescript-dev-webpack
versionwebpack.config.js
file according to latest changes - create a backup of the old onehooks
directory - create backup of it and allownpm
to recreate it on its own- remove all dev plugins that will not be supported anymore and add required development dependencies instead of them:
nativescript-dev-sass
should be replaced withnode-sass
nativescript-dev-typescript
should be replaced withtypescript
(possiblytypescript
is already a devDependency of the project)nativescript-dev-less
should be replaced withless
- it will be great if the command can update all dependencies to their latest versions - due to changes around AndroidX most of the plugins will need a new version to be published. Their old versions will not work with Android runtime that supports only AndroidX.
After updating the package.json and backing up the directories, CLI should execute npm rebuild
, so all new dependencies and devDependencies will be installed and all required hooks will be generated in the project.
Also it will be great to check the project files and notify the users if there are .xml
/.css
files that do not follow the convention requirements of our webpack logic (i.e. they do not have page
or root
in the name) and show warnings for them.
Describe alternatives you've considered
CLI might show interactive prompts which of the mentioned components to be updated.