thaliproject / postcardapp

A sample app to demonstrate how to build Thali applications
MIT License
22 stars 5 forks source link

Make it easier to run on localhost. #59

Closed vjrantal closed 8 years ago

vjrantal commented 8 years ago

The main fix is to assign the mock object to global.Mobile rather than to defining it with var Mobile, because otherwise, the definition would apply only within the current module.

The trigger for the mockups was moved behind a more explicit MOCK_MOBILE environment variable rather than NODE_ENV, because the latter is a fairly commonly used and we don't want these mocks to accidentally apply, for example, in a Cordova-based environment.

The readme is updated with steps needed after a fresh clone to be able to run on localhost.

Fixes #58.

Review on Reviewable

deadlyfingers commented 8 years ago

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


readme.md, line 111 [r1] (raw file): If we include the jx npm install commands should we also include the --autoremove "_.gz" option as well? So the same node_modules dir can be used to build for Android? Or else add the line: find ./nodemodules -name ".gz" -type f -delete

And the same goes for bower install: find ./bower_components -name "*.gz" -type f -delete to delete the .gz files which cause build errors on Android.


Comments from the review on Reviewable.io

vjrantal commented 8 years ago

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


readme.md, line 111 [r1] (raw file): Agreed.

I amended the commit to have the same commands for *.gz deletion as what is instructed below building for devices.

Done.


Comments from the review on Reviewable.io

deadlyfingers commented 8 years ago

Reviewed 1 of 3 files at r1. Review status: 0 of 3 files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

deadlyfingers commented 8 years ago

Reviewed 2 of 3 files at r1, 1 of 1 files at r2. Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io