npm install ionic-app-lib --save
Using this library
var ionicAppLib =cordova = ionicAppLibcordovaserve = ionicAppLibservestart = ionicAppLibstart;var options =appDirectory: 'IonicApp'appName: 'Test'packageName: 'com.ionic.test'isCordovaProject: truetemplate: 'tabs'targetPath: '/User/Path/Development/';start;//Start an Ionic server with LiveReload on your filesservestartoptionscordova;cordova;
Commands to convert:
- cordova (using cordova-lib)
- add platform
- remove platform
- add plugin
- remove plugin
cordova (using cordova-lib - run/emulate/compile/build) upload stats
Developing this library
To use this library from another project, simply take your command line to the root of this directory and run
Then in the project you wish to consume the library, run
npm link ionic-app-lib. Then
require('ionic-app-lib') and start using the commands listed in index.js.
The idea and plan
The idea here is to make the CLI library easier to use from any interface.
This project will contain all the logic to make all of the commands happen - start/serve/platform/run/emulate/etc..
The root file, index.js - will import all of the other modules/commands, to provide an interface to run all of the tasks.
The lib folder will contain all of the individual commands.
Strategy going forward
Need to think about how to start cutting over forward development and passing it off to this library instead of straight parsing arguments from CLI.