-
Notifications
You must be signed in to change notification settings - Fork 84
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
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cb27465
make prpl-server changes
notwaldorf 0972fac
update polymer.json
notwaldorf 4e3ef30
add entrypoint push script
notwaldorf 254ad7c
ie11, always a grumpers
notwaldorf a241764
fix deploy script
notwaldorf 3fc4342
Merge branch 'master' into 2.0-preview-with-prpl-server
keanulee 76bfdac
Merge branch 'master' into 2.0-preview-with-prpl-server
keanulee fff2034
Add --bot-proxy to rendertron
keanulee 58485f5
Merge branch 'master' into 2.0-preview-with-prpl-server
keanulee 0c48155
Bump prpl-server version
keanulee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
runtime: nodejs | ||
env: flex | ||
automatic_scaling: | ||
min_num_instances: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "news", | ||
"private": true, | ||
"scripts": { | ||
"start": "prpl-server --root build/ --host 0.0.0.0 --https-redirect --bot-proxy https://render-tron.appspot.com/render", | ||
"deploy": "polymer build && node scripts/add_routes_to_push_manifest.js && gcloud app deploy --project polymer-news" | ||
}, | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
"dependencies": { | ||
"prpl-server": "^0.11.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Usage: | ||
* node scripts/add_routes_to_push_manifest.js | ||
*/ | ||
|
||
const fs = require('fs'); | ||
const pushManifestPath = 'build/es6-unbundled/push-manifest.json'; | ||
const pushManifest = require(`../${pushManifestPath}`); | ||
const newManifest = {}; | ||
|
||
const navigateRequestPreloads = { | ||
"bower_components/webcomponentsjs/webcomponents-loader.js": { | ||
"type": "script", | ||
"weight": 1 | ||
} | ||
}; | ||
|
||
let homePage = Object.assign({ | ||
"src/news-app.html": { | ||
"type": "document", | ||
"weight": 1 | ||
}, | ||
"src/news-list.html": { | ||
"type": "document", | ||
"weight": 1 | ||
} | ||
}, | ||
pushManifest['/'], | ||
pushManifest['/list/.*'], | ||
pushManifest['src/news-app.html'], | ||
pushManifest['src/news-list.html'], | ||
navigateRequestPreloads); | ||
newManifest['/'] = newManifest['/list/.*'] = homePage; | ||
|
||
newManifest['/article/.*'] = Object.assign({ | ||
"src/news-app.html": { | ||
"type": "document", | ||
"weight": 1 | ||
}, | ||
"src/news-article.html": { | ||
"type": "document", | ||
"weight": 1 | ||
} | ||
}, | ||
pushManifest['/article/.*'], | ||
pushManifest['src/news-app.html'], | ||
pushManifest['src/news-article.html'], | ||
navigateRequestPreloads); | ||
|
||
// HACK(keanulee): need to dedup already pushed assets - | ||
// https://github.com/Polymer/polymer-build/issues/260 | ||
const dedupedLazyResourcesAssets = {}; | ||
const lazyResourcesAssets = pushManifest['src/lazy-resources.html']; | ||
Object.keys(lazyResourcesAssets).forEach((asset) => { | ||
if (!newManifest['/'][asset]) { | ||
dedupedLazyResourcesAssets[asset] = lazyResourcesAssets[asset]; | ||
} | ||
}); | ||
newManifest['src/lazy-resources.html'] = dedupedLazyResourcesAssets; | ||
|
||
fs.writeFileSync(pushManifestPath, JSON.stringify(newManifest, null, 2)); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Monica!