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

2.0 preview + prpl server tests #141

Closed
wants to merge 10 commits into from

Conversation

notwaldorf
Copy link
Contributor

@notwaldorf notwaldorf commented Sep 26, 2017

Added prpl-server config and stuff.

This also includes the 2.0-preview branch changes because I was lazy, but if you want to review that branch separately and then do 2 merges, we can totally do that too.

@frankiefu @keanulee 👀 🙏

@notwaldorf notwaldorf changed the title [don't merge] 2.0 preview + prpl server tests 2.0 preview + prpl server tests Sep 28, 2017
polymer.json Outdated
"builds": [
{
"preset": "es5-bundled",
"basePath": true
Copy link
Member

Choose a reason for hiding this comment

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

Adding "basePath": true will make the build not working on a standard file server (e.g. polymer serve build/es6-unbundled). See this comment: Polymer/prpl-server#24 (comment)
In Shop @keanulee has another branch which contains all the changes needed for deploying to prpl-server.

Copy link
Contributor

Choose a reason for hiding this comment

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

For Shop we merged the 2.0 changes to master, but kept the prpl-server-specifc changes in a branch, which will not be merged to master for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh in that case, those changes are already in #136. Should I merge that branch?

@@ -1,11 +1,9 @@
module.exports = {
staticFileGlobs: [
'/manifest.json',
'/bower_components/webcomponentsjs/webcomponents-lite.min.js',
'/bower_components/webcomponentsjs/*.js',
Copy link
Member

Choose a reason for hiding this comment

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

I know you didn't do that but do you mind updating this to only have '/bower_components/webcomponentsjs/webcomponents-loader.js', and use runtimeCache for other polyfill files. See how we did that in Shop: https://github.com/Polymer/shop/blob/app-engine-node/sw-precache-config.js#L5

Copy link
Contributor

@abdonrd abdonrd Sep 29, 2017

Choose a reason for hiding this comment

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

Oh! I'm going to do the same in the PSK: Polymer/polymer-starter-kit#1066


About the index.html, should it be in staticFileGlobs or in navigateFallback? Or in both? Or in none?

  • news: in none.
  • shop: in staticFileGlobs.
  • polymer-starter-kit: in staticFileGlobs & navigateFallback.

Copy link
Contributor

Choose a reason for hiding this comment

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

Technically, index.html is not needed in either staticFileGlobs or navigateFallback since polymer build will already do so. Including it is a no-op.

README.md Outdated

## Deploy to Google App Engine

gcloud app deploy build/bundled/app.yaml --project [YOUR_PROJECT_ID]
gcloud app deploy build/es6-unbundled/app.yaml --project [YOUR_PROJECT_ID]
Copy link
Member

Choose a reason for hiding this comment

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

Maybe update the README to include es6-bundled build. See the README in Shop: https://github.com/Polymer/shop/blob/master/README.md

@@ -1,11 +1,9 @@
module.exports = {
staticFileGlobs: [
'/manifest.json',
Copy link
Contributor

@abdonrd abdonrd Sep 29, 2017

Choose a reason for hiding this comment

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

Should not routes be relative? Also in the manifest.json.

Like the PSK: Polymer/polymer-starter-kit#1008

Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't seem to make a difference, as polymer build will remove the leading slash (so it's always relative to the specific build, like es6-bundled/).

@keanulee
Copy link
Contributor

keanulee commented Sep 29, 2017

@notwaldorf Let's update the 2.0-preview branch with the non-prpl-server-specific stuff (like basePath or app.yaml) and make sw-precache-config.js consistent with Shop and PSK (just updated https://github.com/Polymer/shop/blob/master/sw-precache-config.js and will work with @abdonrd to update PSK). Then we'll merge 2.0-preview into master.

@keanulee keanulee assigned notwaldorf and unassigned keanulee Sep 29, 2017
@abdonrd
Copy link
Contributor

abdonrd commented Sep 30, 2017

@keanulee thanks! Should be nice if we also sync the manifest.json.

@@ -97,7 +97,7 @@
this._setFailure(false);
return;
}
this._fetch('/data/articles/' + article.id + '.html',
this._fetch('data/articles/' + article.id + '.html',
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be part of the master, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Updated and re-merged

@@ -0,0 +1,61 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the polymer-build do this at some point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should, yeah. I think we're still discussing what the syntax should look like

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks Monica!

@keanulee keanulee force-pushed the 2.0-preview-with-prpl-server branch from a6a9756 to 3fc4342 Compare October 2, 2017 22:01
abdonrd referenced this pull request in Polymer/polymer-starter-kit Oct 3, 2017
@notwaldorf
Copy link
Contributor Author

You guysssssss I don't remember what's happening in this PR. Should we merge it? Should we not? @frankiefu @keanulee

@frankiefu
Copy link
Member

@keanulee has already made a branch for the prpl-server config stuffs in here: https://github.com/Polymer/news/tree/prpl-node-server.
I think we can close this PR and probably delete the branch.

@keanulee
Copy link
Contributor

keanulee commented Mar 7, 2018

Yeah, we're not merging server config stuff into master. prpl-server-node will serve as reference.

@keanulee keanulee closed this Mar 7, 2018
@notwaldorf notwaldorf deleted the 2.0-preview-with-prpl-server branch March 7, 2018 18:55
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.

4 participants