npm install ionic-app-lib --save
var ionicAppLib =cordova = ionicAppLibcordovaserve = ionicAppLibservestart = ionicAppLibstart;var options =appDirectory: 'IonicApp'appName: 'Test'packageName: 'com.ionic.test,isCordovaProject: true,template: 'tabs',targetPath: '/User/Path/Development/'};start.startApp(options);//Start an Ionic server with LiveReload on your filesserve.start(options)cordova.addPlatform(appPath, platform);cordova.runPlatform(appPath, platform);
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
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 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.
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.