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

Add Cordova build target #3

Merged
merged 1 commit into from
Mar 2, 2016
Merged

Conversation

michielbdejong
Copy link
Contributor

Looks like gulp is building ES6 - should find out how to generate ES5 code.

@michielbdejong michielbdejong changed the title [WiP] Add Cordova build target Add Cordova build target Feb 24, 2016
@michielbdejong
Copy link
Contributor Author

r? @gmarty

Thanks for looking into the ES5 issue, that worked! :)

@@ -16,6 +16,7 @@
<link rel="icon" sizes="512x512" href="img/icons/512.png">
<meta name="application-name" content="Foxbox Client">
<title>Foxbox Client</title>
<script type="text/javascript" src="cordova.js"></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed for the Cordova build; I added an empty app/cordova.js file to the repo so that it won't error when using gulp to serve the app on http://localhost:8000/. We should do this in a fancier way eventually, but I think for now it does the trick. :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the type="text/javascript" attribute and add a defer one, for the sake of consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@gmarty
Copy link
Collaborator

gmarty commented Feb 24, 2016

This PR looks good to me, but I think we should wait until the es5 issue is fixed in the MVC repo then we can just update the dependencies. This issue is being tracked at fxos-eng/sanitizer#3. Let's see how it goes.

@michielbdejong
Copy link
Contributor Author

OK! Will merge it without the app/components/fxos-mvc/dist/mvc.js changes once that's updated in master.

@@ -0,0 +1 @@
<!-- to be generated during Cordova build -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you make it a regular comment? It seems that HTML style comments are not supported by Microsoft browsers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah of course, this is a .js file, wrong comment style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@gmarty gmarty force-pushed the master branch 6 times, most recently from 09bf09c to b11a123 Compare February 26, 2016 15:52
cordova platform add android
cordova build android
cordova emulate android
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think you can make this a gulp task in the gulpfile.js instead?
The command to build would just have to be gulp cordova.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, will have a look at that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I couldn't merge gulp cordova-setup and gulp cordova-android into one task because the second has to run in a folder (dist/cordova), which the first one creates. So I left it as two tasks, hope that's ok.

@michielbdejong michielbdejong force-pushed the cordova-target branch 2 times, most recently from 9c7a6c7 to cef51be Compare March 1, 2016 15:26
@michielbdejong
Copy link
Contributor Author

This PR looks good to me, but I think we should wait until the es5 issue is fixed in the MVC repo then we can just update the dependencies. This issue is being tracked at fxos-eng/sanitizer#3. Let's see how it goes.

Can we just merge it now and then iterate later?

cordovaHTTP && cordovaHTTP.acceptHss) {
this.supported = true;
} else {
this.supported = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this line read?

this.supported = false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Fixed.

@michielbdejong
Copy link
Contributor Author

@gmarty addressed your latest review comments.

gmarty added a commit that referenced this pull request Mar 2, 2016
@gmarty gmarty merged commit f6906be into fxbox:master Mar 2, 2016
@michielbdejong michielbdejong deleted the cordova-target branch March 2, 2016 14:29
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.

2 participants