Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #136 - Allow to use Ionic CLI #141

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jayserdny
Copy link

@jayserdny jayserdny commented Oct 22, 2017

This fix allows you to use Ionic CLI along this project. The only thing you need is to install the following dependence:

npm i typescript-compiler

Then, you can run your app using Ionic CLI by executing the following command:

npm run [platform] -- --[extra flags]

Things done to accomplish this:

  • Install the ts compiler in order to run the script.
  • Add npm scripts to automate the compilation of 'ts' files inside 'api/server' folder.
  • Tell Meteor to ignore 'js' files to avoid conflicts with 'ts' files.

Examples of how to run the app using Ionic CLI

  • npm run android -- --prod --release --aot
  • npm run ios -- --prod --release --aot
  • npm run android
  • npm run ios

@jayserdny jayserdny changed the title Fix for issue #136 Fix for issue #136 - Allow to use Ionic CLI Oct 22, 2017
@@ -0,0 +1,2 @@
**/*.js
**/*.js.map
Copy link
Author

@jayserdny jayserdny Oct 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exclude all .js & .js.map files to avoid conflicts with typescript compiler

"tsc-compiler": "tsc",
"cordova-run": "ionic cordova run",
"android": "cd api/server && npm run tsc-compiler && cd ../.. && npm run cordova-run android -- ",
"ios": "cd api/server && npm run tsc-compiler && cd ../.. && npm run cordova-run ios -- "
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scripts added

  • "tsc-compiler" - to run the Typescript compiler in the given folder
  • "cordova-run" - to tell ionic to run the app using cordova
  • "android" - to run the application with the platform android
  • "ios" - to run the application with the platform ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant