Skip to content

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

Open
jayserdny wants to merge 4 commits intoUrigo:masterfrom
jayserdny:fix-136
Open

Fix for issue #136 - Allow to use Ionic CLI#141
jayserdny wants to merge 4 commits intoUrigo:masterfrom
jayserdny:fix-136

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 No newline at end of file
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