For more info, please see the Medium post that accompanies this repo.
For our shared package:
cd shared-code npm i // compile typescript... tsc npm link For our consuming packages:
cd ionic-app-one npm i // npm 'link' is not strictly necessary here, // as it's done by the 'ionic serve' command... // it's only here for reference purposes. npm link shared-code and/or:
cd ionic-app-two npm i // npm 'link' is not strictly necessary here, // as it's done by the 'ionic serve' command... // it's only here for reference purposes. npm link shared-code Open two terminal tabs/windows, and...
This will run and recompile our typescript whenever there is a change in this package:
cd shared-code npm run watch cd ionic-app-one ionic serve