The Capacitor TestApp is used to develop new features and verify bug fixes in Capacitor and the official plugins. It is built with Ionic React.
-
Fork and clone this repo.
-
Install the dependencies.
npm install
The TestApp is just like any other Ionic React app. See the docs to learn what you can do.
ionic buildto build web assetsionic serveto run web version in your browserionic cap syncionic cap run <platform>(also w/ livereload: just add-l --externalflags)
You can also opt-out of the Ionic CLI and use npm scripts and the Capacitor CLI directly:
npm run buildnpm startnpx cap syncnpx cap run <platform>(no automatic livereload)
New to Capacitor development? Start here.
To use the TestApp to develop Capacitor and official plugins, make sure you have set up the sibling repositories. Clone Capacitor and the plugins repo into the same parent directory.
cd ../
git clone [email protected]:ionic-team/capacitor.git
git clone [email protected]:ionic-team/capacitor-plugins.git
Follow the setup instructions for each repo:
capacitorcapacitor-plugins(make sure to runnpm run toggle-local)
Then, back in this repo, run the following to link the packages in both repos to this app:
npm install
npm run toggle-local