forked from Polymer/polymer-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This does the following: 1. Add gulp tasks to deploy to Github Pages 2. Revises routing to handle hosting from a subfolder 3. Allows development environment to run from root while production can run from subfolder 4. Add link to PSK demo in readme.md 5. Add deploy section to readme.md 6. Add detail Deploy to Github Pages recipe Remove getUrl function and use data binding instead With Polymer 1.2.0 we can now use compound bindings so getUrl function is not needed. Change Github to GitHub Fixed linting errors Add example for deploy to GitHub pages use $ variable instead of require for ghPages
- Loading branch information
Showing
11 changed files
with
84 additions
and
11 deletions.
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
dist | ||
bower_components | ||
.tmp | ||
.publish/ |
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
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
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
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,23 @@ | ||
# Deploy to Github Pages | ||
|
||
You can deploy to github pages with a couple minor changes to Polymer Starter Kit: | ||
|
||
1. Uncomment this line `// app.baseUrl = '/polymer-starter-kit/';` in app.js near the top | ||
|
||
```JavaScript | ||
// Sets app default base URL | ||
app.baseUrl = '/'; | ||
if (window.location.port === '') { // if production | ||
// Uncomment app.baseURL below and | ||
// set app.baseURL to '/your-pathname/' if running from folder in production | ||
// app.baseUrl = '/polymer-starter-kit/'; | ||
} | ||
``` | ||
2. Change `app.baseUrl = '/polymer-starter-kit/';` to `app.baseUrl = '/your-pathname/';` (ex: if you repo is `github.com/username/bobs-awesome-site` you would change this to `bobs-awesome-site`) | ||
3. Run `gulp build-deploy-gh-pages` from command line | ||
4. To see changes wait 1-2 minutes then load Github pages for your app (ex: http://polymerelements.github.io/polymer-starter-kit) | ||
|
||
### Notes | ||
|
||
* When deploying to Github Pages we recommend using hashbangs which is Polymer Starter Kit default. | ||
* This method should work for most hosting providers when using a subfolder. |
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