0

MD History: Run polymer-css-build over vulcanized output

polymer-css-build preprocesses CSS to perform transformations
ahead-of-time that would otherwise need to be done by the browser during
page load. This saves approximately 5% off page load for MD History, and
should have a similar impact on MD Downloads.

BUG=629406,629710
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2268863002
Cr-Commit-Position: refs/heads/master@{#416496}
This commit is contained in:
tsergeant
2016-09-04 22:07:49 -07:00
committed by Commit bot
parent d4fe03704a
commit 310a320dfc
4 changed files with 4940 additions and 3437 deletions
chrome/browser/resources
docs

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -92,6 +92,7 @@ def _vulcanize(directory, host, html_in_file, html_out_file='vulcanized.html',
'--beautify', 'indent-level=2,quote_style=3',
'--comments', '/Copyright|license|LICENSE|\<\/?if/',
'--output', js_out_path])
_run_cmd(['polymer-css-build', html_out_path])
finally:
os.remove(tmp.name)

@ -13,6 +13,7 @@ Vulcanization currently requires:
- vulcanize: 1.14.8 (can be found with `vulcanize --version`)
- crisper: 2.0.1 (can be found with `npm list -g crisper`)
- uglifyjs: 2.4.10 (can be found with `uglifyjs --version`)
- polymer-css-build: 0.0.6 (can be found with `npm list -g polymer-css-build`)
## Installing required software
@ -28,11 +29,11 @@ $ npm config set -g prefix "$HOME/node_modules"
Then install the required modules:
```bash
$ npm install -g crisper vulcanize
$ npm install -g crisper vulcanize uglifyjs polymer-css-build
```
Ultimately, all that is required to run this script is that `crisper`, 'uglify'
and `vulcanize` are on your `$PATH`.
Ultimately, all that is required to run this script is that the node binaries
listed above are on your $PATH.
## Combining resources with vulcanize