A tool to manage duplicated app in same project
Sometimes in our business we have two o more app than are the same but with differents UI. Instead of create more project, this tools helps you to manage multiples app with one project for {N}.
Use it with npx
npm install -g npx
then
npm install nativescript-app-duplicator
In first place, this plugin works with webpack flow for {N} and every commands needs a project "state" to work. Lets see commands
npx ns-dup [APPNAME] [--option]
Options than require APPNAME:
- --workwith or -w: set the project state to "Working on APPNAME"
- --restore or -r: restore APPNAME on state "not working" and set "Neutral state"
- --new or -n: needs to be in state "WOKRING", it will duplicate the WORKING project with APPNAME namew
- --delete or -d: delete APPNAME project
Not require APPNAME:
- --help or -h: show options
After you've created a new project with {N} cli, you have to enter in a multiproject state, so you must execute
npx ns-dup [FIRST_PROJECT_NAME] --restore
When a project is in a "working state" it means that you can work on it, the other project will not be affected ƒrom your changes on it.
No project are in working state
app
|- App_Resources_[PROJECT NAME]
|-..
..
[PROJECT NAME]_package.json
--
The duplicator renames resources and package.json to works with {N} CLI