When I type cordova --help I get a fair bit of information of commands to try and test out.
cordova --help
cordova command [options]
Global Commands
create ............................. Create a project
help ............................... Get help for a command
telemetry .......................... Turn telemetry collection on or off
config ............................. Set, get, delete, edit, and list global cordova options
Project Commands
info ............................... Generate project information
requirements ....................... Checks and print out all the requirements
for platforms specified
platform ........................... Manage project platforms
plugin ............................. Manage project plugins
prepare ............................ Copy files into platform(s) for building
compile ............................ Build platform(s)
clean .............................. Cleanup project from build artifacts
run ................................ Run project
(including prepare && compile)
serve .............................. Run project with a local webserver
(including prepare)
Learn more about command options using 'cordova help <command>'
Aliases
build -> cordova prepare && cordova compile
emulate -> cordova run --emulator
Options
-v, --version ...................... prints out this utility's version
-d, --verbose ...................... debug mode produces verbose log output for all activity,
--no-update-notifier ............... disables check for CLI updates
--nohooks .......................... suppress executing hooks
(taking RegExp hook patterns as parameters)
Examples
cordova create myApp org.apache.cordova.myApp myApp
cordova plugin add cordova-plugin-camera
cordova platform add android
cordova plugin add cordova-plugin-camera --nosave
cordova platform add android --nosave
cordova requirements android
cordova build android --verbose
cordova run android
cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
cordova config ls
But when I type capacitor --help I get very little information and no examples. Does anyone have any command line examples that I can try out to see how things work?
I know the main page at https://capacitor.ionicframework.com/docs/android/custom-code/ has lots of code, but there has to be a few main command line examples that can be written in a few lines. even capacitor create --help does not give much more information and has no examples.
Could someone reply with a few command line capacitor examples they have tried!
capacitor --help
Usage: capacitor [options] [command] <command>
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
create [options] [directory] [name] [id] Creates a new Capacitor project
init [options] [appName] [appId] Initializes a new Capacitor project in the current directory
serve Serves a Capacitor Progressive Web App in the browser
sync [platform] updates + copy
update [platform] updates the native plugins and dependencies based in package.json
copy [platform] copies the web app build into the native app
open [platform] opens the native project workspace (xcode for iOS)
add [platform] add a native platform project
ls [platform] list installed Cordova and Capacitor plugins
doctor [platform] checks the current setup for common errors
plugin:generate start a new Capacitor plugin