Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Commit

Permalink
docs(API): explain a bit more publicPath
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 30, 2017
1 parent 560fdb7 commit 210b54d
Show file tree
Hide file tree
Showing 8 changed files with 576 additions and 366 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
/lib
/docs/dist
/flow/interfaces
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Exclude matched assets from being added to the `serviceWorkerOption.assets` vari
Include matched assets added to the `serviceWorkerOption.assets` variable. (Whitelist)
- `publicPath`, *string*, default `'/'`:
Specifies the public URL address of the output files when referenced in a browser.
We use this value to load the service worker over the network.
- `template`, *function*, default noop:
This callback function can be used to inject statically generated service worker.
It's taking a `serviceWorkerOption` argument and must return a promise.
Expand Down
6 changes: 1 addition & 5 deletions docs/src/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ const styles = {
const Body = props => {
const { children } = props

return (
<div style={styles.root}>
{children}
</div>
)
return <div style={styles.root}>{children}</div>
}

Body.propTypes = {
Expand Down
20 changes: 5 additions & 15 deletions docs/src/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,18 @@ const Footer = props => {
return (
<footer className="site-footer">
<span className="site-footer-owner">
<a href={repositoryUrl}>
{repositoryName}
</a>
<a href={repositoryUrl}>{repositoryName}</a>
{' is maintained by '}
<a href={maintainerUrl}>
{maintainerName}
</a>
<a href={maintainerUrl}>{maintainerName}</a>
{'.'}
</span>
<span className="site-footer-credits">
{'This page was generated by '}
<a href="https://pages.github.com">
{'GitHub Pages'}
</a>
<a href="https://pages.github.com">{'GitHub Pages'}</a>
{' using the '}
<a href="https://github.com/jasonlong/cayman-theme">
{'Cayman theme'}
</a>
<a href="https://github.com/jasonlong/cayman-theme">{'Cayman theme'}</a>
{' by '}
<a href="https://twitter.com/jasonlong">
{'Jason Long'}
</a>
<a href="https://twitter.com/jasonlong">{'Jason Long'}</a>
{'.'}
</span>
</footer>
Expand Down
8 changes: 2 additions & 6 deletions docs/src/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ const Head = props => {

return (
<section className="page-header">
<h1 className="project-name">
{name}
</h1>
<h2 className="project-tagline">
{description}
</h2>
<h1 className="project-name">{name}</h1>
<h2 className="project-tagline">{description}</h2>
{children}
</section>
)
Expand Down
10 changes: 2 additions & 8 deletions docs/src/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ class Main extends Component {
</a>
</Head>
<Body>
<h3>
{'Logs'}
</h3>
<h3>{'Logs'}</h3>
<ul>
{this.state.logs.map((log, index) => {
let message
Expand All @@ -90,11 +88,7 @@ class Main extends Component {

case 'onUpdateReady':
message = 'a new serviceworker update is ready'
more = (
<button onClick={this.handleClickReload}>
{'Reload'}
</button>
)
more = <button onClick={this.handleClickReload}>{'Reload'}</button>
break

case 'onUpdating':
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,42 @@
"webpack": "1 || ^2 || ^3"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-cli": "^6.23.0",
"babel-core": "^6.25.0",
"autoprefixer": "^7.1.3",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.1.1",
"babel-loader": "^7.1.1",
"babel-loader": "^7.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-1": "^6.16.0",
"chai": "^4.1.0",
"css-loader": "^0.28.4",
"eslint": "^3.15.0",
"eslint-config-airbnb": "^15.0.2",
"eslint-plugin-babel": "^4.0.0",
"chai": "^4.1.1",
"css-loader": "^0.28.6",
"eslint": "^4.5.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-mocha": "^4.11.0",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-react": "^7.3.0",
"extract-text-webpack-plugin": "^3.0.0",
"flow-bin": "^0.51.0",
"flow-bin": "^0.53.1",
"force-case-sensitivity-webpack-plugin": "^0.2.1",
"html-webpack-plugin": "^2.29.0",
"html-webpack-plugin": "^2.30.1",
"loglevel": "^1.4.1",
"mocha": "^3.4.2",
"mocha": "^3.5.0",
"node-sass": "^4.5.0",
"pkgfiles": "^2.3.2",
"postcss-loader": "^2.0.6",
"prettier": "^1.5.3",
"prettier": "^1.6.1",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-hot-loader": "^3.0.0-beta.6",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"webpack": "^3.3.0",
"webpack-dev-server": "^2.6.0"
"webpack": "^3.5.5",
"webpack-dev-server": "^2.7.1"
}
}
Loading

0 comments on commit 210b54d

Please sign in to comment.