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

Adding mock object to self-inspect while running locally as a web app. #65

Merged
merged 1 commit into from Mar 27, 2014

Conversation

arthurakay
Copy link
Contributor

No description provided.

arthurakay added a commit that referenced this pull request Mar 27, 2014
Adding mock object to self-inspect while running locally as a web app.
@arthurakay arthurakay merged commit 4be9e8c into senchalabs:master Mar 27, 2014
@@ -11,6 +11,7 @@
<script src="bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script src="ext/ext-theme-neptune.js"></script>
<script src="mocks.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

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

@arthurakay I'll have a look how we can add the mock.js only when running grunt dev so the normal grunt build stays clean. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have it as is so that I can run the index.html from a localhost, for debugging the app itself. Hence the tags inside the JS file... though I'm open to suggestion.

Copy link
Contributor

Choose a reason for hiding this comment

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

With a small task we make sure that app/AppInspector/mocks.js is only used when running in dev mode, e.g. via localhost from /app/AppInspector/ or dist/.
We also keep the build clean.

  • when developing run grunt dev or grunt watch, this will add the mocks.js to app/AppInspector/index.html and dist/AppInspector/index.html.
  • when building for a release run grunt or grunt build this will clean out usage mocks.js.

@stoe
Copy link
Contributor

stoe commented Mar 28, 2014

ok, please forget all I've said and done so far ... my bad :|

@stoe stoe mentioned this pull request Mar 28, 2014
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.

None yet

2 participants