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

Build tool options rework #2191

Merged
merged 2 commits into from
Aug 20, 2019
Merged

Build tool options rework #2191

merged 2 commits into from
Aug 20, 2019

Conversation

jeffposnick
Copy link
Contributor

R: @philipwalton

This is a general refactor of the directory structure and inheritance for our joi-based options validation. In the process, I loosened one of the restrictions so that developers using workbox-build's generateSW mode could use runtimeCaching could be used without precaching (fixes #2078).

The PR got pretty large, given all the files moved around, so I'm going to submit a follow-up PR that deals with JSDocs for our options, which I think is ultimately a more sustainable documentation setup than what we currently use. (C.f. https://github.com/google/WebFundamentals/tree/master/src/content/en/tools/workbox/_shared/config)

@workbox-pr-bot
Copy link
Collaborator

PR-Bot Size Plugin

Changed File Sizes

File Before After Change GZipped
packages/workbox-build/build/index.js 3.30 KB 613 B -81% 344 B 🎉
packages/workbox-webpack-plugin/build/generate-sw.js 4.24 KB 4.21 KB -1% 1.61 KB
packages/workbox-webpack-plugin/build/inject-manifest.js 5.12 KB 5.10 KB -0% 1.77 KB

New Files

File Size GZipped
packages/workbox-build/build/generate-sw.js 1.99 KB 966 B
packages/workbox-build/build/get-manifest.js 1.60 KB 779 B
packages/workbox-build/build/inject-manifest.js 3.13 KB 1.36 KB

All File Sizes

View Table
File Before After Change GZipped
packages/workbox-background-sync/build/workbox-background-sync.prod.js 3.87 KB 3.87 KB 0% 1.60 KB
packages/workbox-broadcast-update/build/workbox-broadcast-update.prod.js 1.02 KB 1.02 KB 0% 578 B
packages/workbox-build/build/_types.js 41 B 41 B 0% 61 B
packages/workbox-build/build/generate-sw.js 1.99 KB 966 B
packages/workbox-build/build/get-manifest.js 1.60 KB 779 B
packages/workbox-build/build/index.js 3.30 KB 613 B -81% 344 B 🎉
packages/workbox-build/build/inject-manifest.js 3.13 KB 1.36 KB
packages/workbox-cacheable-response/build/workbox-cacheable-response.prod.js 611 B 611 B 0% 357 B
packages/workbox-cli/build/app.js 4.16 KB 4.16 KB 0% 1.64 KB
packages/workbox-cli/build/bin.js 940 B 940 B 0% 502 B
packages/workbox-core/build/workbox-core.prod.js 5.94 KB 5.94 KB 0% 2.46 KB
packages/workbox-expiration/build/workbox-expiration.prod.js 2.95 KB 2.95 KB 0% 1.27 KB
packages/workbox-google-analytics/build/workbox-offline-ga.prod.js 1.97 KB 1.97 KB 0% 916 B
packages/workbox-navigation-preload/build/workbox-navigation-preload.prod.js 660 B 660 B 0% 323 B
packages/workbox-precaching/build/workbox-precaching.prod.js 4.99 KB 4.99 KB 0% 1.94 KB
packages/workbox-range-requests/build/workbox-range-requests.prod.js 1.58 KB 1.58 KB 0% 801 B
packages/workbox-routing/build/workbox-routing.prod.js 3.09 KB 3.09 KB 0% 1.36 KB
packages/workbox-strategies/build/workbox-strategies.prod.js 4.10 KB 4.10 KB 0% 1.13 KB
packages/workbox-streams/build/workbox-streams.prod.js 1.46 KB 1.46 KB 0% 721 B
packages/workbox-sw/build/workbox-sw.js 1.34 KB 1.34 KB 0% 748 B
packages/workbox-webpack-plugin/build/generate-sw.js 4.24 KB 4.21 KB -1% 1.61 KB
packages/workbox-webpack-plugin/build/index.js 349 B 349 B 0% 255 B
packages/workbox-webpack-plugin/build/inject-manifest.js 5.12 KB 5.10 KB -0% 1.77 KB
packages/workbox-window/build/workbox-window.dev.umd.js 40.62 KB 40.62 KB 0% 8.92 KB
packages/workbox-window/build/workbox-window.prod.umd.js 4.48 KB 4.48 KB 0% 1.83 KB

Workbox Aggregate Size Plugin

3.5KB gzip'ed (23% of limit)
7.87KB uncompressed

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 79.314% when pulling 8475dbe on options-rework into d7a7cc0 on master.

Copy link
Member

@philipwalton philipwalton left a comment

Choose a reason for hiding this comment

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

LGTM with one small nit.

packages/workbox-build/src/options/schema/generate-sw.js Outdated Show resolved Hide resolved
@jeffposnick jeffposnick merged commit 5a8b031 into master Aug 20, 2019
@jeffposnick jeffposnick deleted the options-rework branch August 20, 2019 13:20
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.

generateSW with runtimeCaching & no precaching
4 participants