Commit Graph

42 Commits

Author SHA1 Message Date
Jake Archibald
e572b853e2 Snackbar defaults & copy undo (#233)
* Fix snackbar defaults. Fixes #205.

* Undo copy settings across.

* Oops

* Fixing stupid minification bug

* Something weird happened with the last commit
2018-11-06 13:44:15 +00:00
Jake Archibald
bdd3c11f1a Options ui (#222)
* wip

* Commenting stuff to keep the build happy

* Revealing sections

* Custom select elements & more form work

* Range input styles

* Text fields with inputs do the right thing

* Safari & Firefox fixes

* Large compress select

* oops

* MozJPEG options updated

* OptPNG options

* These asserts weren't true

* Generic options

* WebP options

* Hiding "edit" when "original image"

* Download icon

* Copy setting button - still not happy with this

* Progress indicator

* Loading icon enter/exit anim

* Preventing controls going under options

* Ahh so that's what was causing scrolling

* Ahh so that's what was causing outlines

* Simplifying range styles and fixing cross-browser

* Processing custom element styles

* Get precision from step by default

* I don't know how or when this happened.

* Don't need that many steps

* Avoid having an element that covers the pinch zoom

* Preventing overlap with zoom controls

* Prevent ts warning

* Fixing spinner position

* Simplifying FileSize
2018-11-06 13:36:23 +00:00
Jake Archibald
43def798e1 Two workers & worker termination (#198)
* Refactoring codecs

* Plugging in new processor

* Fixing decorator

* MozJPEG free issue

* Better worker aborting, and terminate workers that aren't used for 10 seconds

* Better comment

* Ooops, half-typed comment

* Uncommenting problematic line

* Surma fixed it!

* Abstracting WASM initialisation

* Better comment

* Don't need this.

* Adding ticket

* noInitalRun

* Reverting MozJPEG issue demo

* Making a const for worker timeout

* Inline docs

* Bail early rather than nesting

* Addressing nits
2018-10-28 09:17:43 +00:00
Jake Archibald
568b9e9459 Styling intro screen and adding demo images. 2018-10-12 14:12:32 +01:00
Surma
54ad30a7ed Optipng (#156)
* omg it’s compiling

* example actually works

* Expose compression level options

* Disable crypto and path module emulation in webpack

* Update README

* Remove small image

* Use -O3 on optipng

* Free memory after copy

* Handle unexpected file reader return types

* Rename level label to effort
2018-09-04 16:49:45 +01:00
Jake Archibald
f2f467ecb8 WebP encode options (#110)
* Flailing

* Holy shit struct binding

* Options in the encoder!

* Integrating webp options

* Addressing feedback

* This isn't needed anymore
2018-07-27 14:06:45 +01:00
Jason Miller
e8e151a926 Fix errors arising from strict .mjs handling. 2018-07-10 10:57:11 -04:00
Jason Miller
38d0057833 Switch to .mjs for ES Modules. Fixes #88. 2018-07-04 10:02:20 -04:00
Jason Miller
3035a68b90 Options UI (#39)
* Initial work to add Options config

* Use a single encoder instance and retry up to 10 times on failure.

* Switch both sides to allow encoding from the source image, add options configuration for each.

* Styling for options (and a few tweaks for the app)

* Dep updates.

* Remove commented out code.

* Fix Encoder typing

* Fix lint issues

* Apparently I didnt have tslint autofix enabled on the chromebook

* Attempt to fix layout/panning issues

* Fix missing custom element import!

* Fix variable naming, remove dynamic encoder names, remove retry, allow encoders to return ImageData.

* Refactor state management to use an Array of objects and immutable updates instead of relying on explicit update notifications.

* Add Identity encoder, which is a passthrough encoder that handles the "original" view.

* Drop comlink-loader into the project and add ".worker" to the jpeg encoder filename so it runs in a worker (🦄)

* lint fixes.

* cleanup

* smaller PR feedback fixes

* rename "jpeg" codec to "MozJpeg"

* Formatting fixes for Options

* Colocate codecs and their options UIs in src/codecs, and standardize the namings

* Handle canvas errors

* Throw if quality is undefined, add default quality

* add note about temp styles

* add note about temp styles [2]

* Renaming updateOption

* Clarify option input bindings

* Move updateCanvas() to util and rename to drawBitmapToCanvas

* use generics to pass through encoder options

* Remove unused dependencies

* fix options type

* const

* Use `Array.prototype.some()` for image loading check

* Display encoding errors in the UI.

* I fought typescript and I think I won

* This doesn't need to be optional

* Quality isn't optional

* Simplifying comlink casting

* Splitting counters into loading and displaying

* Still loading if the loading counter isn't equal.
2018-06-29 16:29:18 +01:00
Surma
d4a616713a Simplify webpack config 2018-05-21 13:29:24 +01:00
Surma
c2e2a1a0b6 Succesfully load wasm file via webpack 2018-05-17 16:04:56 +01:00
Surma
7edb7f0de8 Wrangling TypeScript and webpack to work with Emscripten wasm stuff 2018-05-17 11:24:40 +01:00
Jason Miller
e9eaf227bc Merge branch 'master' into firebase 2018-05-15 11:59:20 -04:00
Jake Archibald
b619427237 Removing everything that isn't skeletonyy (#22)
* Simplifying

* Ignoring CSS defs
2018-05-04 09:20:34 -07:00
Jason Miller
81aaadbabf Remove all prerendering & critical CSS stuff 2018-05-01 09:52:58 -04:00
Jason Miller
da53b5fedc Add more long-term caching headers, fix missing hash in main.css, switch Workbox to use locally generated files instead of Fastly (improves TTI), delay SW install by 1s. 2018-04-22 00:36:58 -04:00
Jason Miller
540b3c8154 Merge branch 'master' into prerendering 2018-04-17 21:35:28 -04:00
Jason Miller
06642fd047 Merge pull request #18 from GoogleChromeLabs/critters-async-await
Critters: async/await & font handling
2018-04-17 21:33:59 -04:00
Jason Miller
dec93a724f Fix for Workbox precaching way too many files 2018-04-17 14:08:23 -04:00
Jason Miller
411614b731 Output minimal stats to the console during build 2018-04-17 14:07:57 -04:00
Jason Miller
896d267de5 Add plugin to make script loading async 2018-04-17 14:07:42 -04:00
Jason Miller
e0c59577a4 Lint webpack config, and only preload initial chunks 2018-04-17 14:07:22 -04:00
Jason Miller
3ba0a5a22a Adds single-pass prerendering via a new prerender-loader 2018-04-17 14:04:55 -04:00
Jason Miller
be8fae10f8 Critters: move to async/await (fixes #16), add critical font inlining / preloading 2018-04-17 13:57:48 -04:00
Jason Miller
718443de30 Only use Babel to process .js files. 2018-04-17 13:42:25 -04:00
Jason Miller
919a259b0a Add option to make async leave a rel="preload" in the header and append a <link rel="stylesheet"> to the end of body. 2018-04-05 12:41:19 -04:00
Jason Miller
0066e20315 - Rename to critters-webpack-plugin
- Format output using pretty-bytes
- Insert inlined style tags immediately after their source link tags
- Add option to turn off external stylesheet processing
- Add `async` option that converts critical'd external sheets to `<link rel="preload" as="style" onload="this.rel='stylesheet'">`
2018-04-03 10:00:41 -04:00
Jason Miller
7bf2ba4690 Initial version of webpack-inline-critical-css-plugin 2018-04-02 22:51:01 -04:00
Jason Miller
1dd0366c05 Fix broken sourcemaps in the TypeScript+Babel setup, clean up webpack config, drop threaded type checking (couldn't get it working) 2018-03-30 16:25:20 -04:00
Jason Miller
76ceea0e52 tabs -> spaces 2018-03-29 15:43:14 -04:00
Jason Miller
5e6500d196 Use strict TypeScript, enable TSLint, update all types to work in strict mode. 2018-03-29 15:42:07 -04:00
Jason Miller
9977e5b8c6 add note about filter(Boolean) 2018-03-29 10:21:56 -04:00
Jason Miller
e347cbe413 Remove commented-out Webpack config and add explanatory comments to anything vague 2018-03-29 10:17:33 -04:00
Jason Miller
e0a10cf334 Drop custom preact alias 2018-03-29 10:15:13 -04:00
Jason Miller
83a0bd16dd infer NODE_ENV from isProd 2018-03-27 20:52:30 -04:00
Jason Miller
720a11ccd3 Error out if required (json) configs are missing/corrupted. 2018-03-27 20:50:58 -04:00
Jason Miller
a5e2952e8c Get rid of DeprecationWarning output filter 2018-03-27 20:48:57 -04:00
Jason Miller
465d043502 let -> const 2018-03-27 20:37:25 -04:00
Jason Miller
cd4fd07519 Remove modules babelrc option 2018-03-27 20:34:36 -04:00
Jason Miller
49c67baa0b Add progress bar and bundle analyzer (http://localhost:8080/report.html) to webpack config. 2018-03-13 12:52:26 -04:00
Jason Miller
e691ec9580 Adds an app skeleton. Still needs some work. 2018-03-12 23:03:31 -04:00
Jason Miller
619080f85a Webpack@4 + mini-css-extract-plugin 2018-03-09 14:17:36 -05:00