diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2f719254a..0fbf1a97c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,12 @@ Welcome! Please use this template for reporting bugs or requesting features. For questions about using Workbox, the best place to ask is Stack Overflow, tagged with `[workbox]`: https://stackoverflow.com/questions/ask?tags=workbox **Library Affected**: -*workbox-sw, workbox-build, etc.* +_workbox-sw, workbox-build, etc._ **Browser & Platform**: -*E.g. Google Chrome v51.0.1 for Android, or "all browsers".* +_E.g. Google Chrome v51.0.1 for Android, or "all browsers"._ **Issue or Feature Request Description**: -*Your request here.* +_Your request here._ -*When reporting bugs, please include relevant JavaScript Console logs and links to public URLs at which the issue could be reproduced.* +_When reporting bugs, please include relevant JavaScript Console logs and links to public URLs at which the issue could be reproduced._ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 33e73b8a9..f5f6ab5a4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,10 @@ **Prior to filing a PR, please:** + - [open an issue](https://github.com/GoogleChrome/workbox/issues/new) to discuss your proposed change. - ensure that `gulp build && gulp lint test` passes locally. R: @jeffposnick @tropicadri -Fixes #*issue number* +Fixes #_issue number_ -*Description of what's changed/fixed.* +_Description of what's changed/fixed._ diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4fe8dd0c2..b201a7bb7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,52 +7,52 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + - uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - uses: actions/setup-node@v1 - with: - node-version: 10.x + - uses: actions/setup-node@v1 + with: + node-version: 10.x - - name: Setup - run: | - npm ci - npx gulp build + - name: Setup + run: | + npm ci + npx gulp build - - run: npx gulp test_node + - run: npx gulp test_node Full_Suite_Mac: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - uses: actions/cache@v1 - with: - path: ~/.selenium-assistant - key: ${{ runner.os }} - - - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: Setup - run: | - sudo safaridriver --enable - npm ci - npx gulp build - - - run: npx gulp test + - uses: actions/checkout@v2 + + - uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - uses: actions/cache@v1 + with: + path: ~/.selenium-assistant + key: ${{ runner.os }} + + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Setup + run: | + sudo safaridriver --enable + npm ci + npx gulp build + + - run: npx gulp test diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..5915c217b --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run format-staged diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 000000000..20d0d06e5 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run lint diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..e1d797e78 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +.nyc_output +.vscode +*.hbs +*.log +build +coverage +docs +generated-release-files +node_modules +packages/** +!packages/*/src/** +temp +test/workbox-webpack-plugin/static/injected-manifest.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 03924468a..94c8d4cfb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,9 @@ We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. Please fill out either the individual or corporate Contributor License Agreement (CLA). - * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +- If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). +- If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. @@ -42,4 +43,4 @@ To do an automated run of the full test suite for the browser-based code against ``` npm run gulp test_integration -``` \ No newline at end of file +``` diff --git a/README.md b/README.md index d9c097203..a756f30e6 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ Workbox is a collection of JavaScript libraries for ## Documentation -* [Overview](https://developers.google.com/web/tools/workbox/) ([site source](https://github.com/google/WebFundamentals/tree/main/src/content/en/tools/workbox)) -* [Get started](https://developers.google.com/web/tools/workbox/guides/get-started) -* [Contribute](CONTRIBUTING.md) +- [Overview](https://developers.google.com/web/tools/workbox/) ([site source](https://github.com/google/WebFundamentals/tree/main/src/content/en/tools/workbox)) +- [Get started](https://developers.google.com/web/tools/workbox/guides/get-started) +- [Contribute](CONTRIBUTING.md) ## Contributing diff --git a/demos/src/workbox-background-sync-demo/index.html b/demos/src/workbox-background-sync-demo/index.html index af27e10fd..c36ea0cc7 100644 --- a/demos/src/workbox-background-sync-demo/index.html +++ b/demos/src/workbox-background-sync-demo/index.html @@ -2,30 +2,37 @@
- - - + +
+ - Back to Demos + Back to Demos +
- - Docs | - GitHub | - @workboxjs - + Docs | + GitHub | + @workboxjs +
- \ No newline at end of file +