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:
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',
|
'--beautify', 'indent-level=2,quote_style=3',
|
||||||
'--comments', '/Copyright|license|LICENSE|\<\/?if/',
|
'--comments', '/Copyright|license|LICENSE|\<\/?if/',
|
||||||
'--output', js_out_path])
|
'--output', js_out_path])
|
||||||
|
_run_cmd(['polymer-css-build', html_out_path])
|
||||||
finally:
|
finally:
|
||||||
os.remove(tmp.name)
|
os.remove(tmp.name)
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@ Vulcanization currently requires:
|
|||||||
- vulcanize: 1.14.8 (can be found with `vulcanize --version`)
|
- vulcanize: 1.14.8 (can be found with `vulcanize --version`)
|
||||||
- crisper: 2.0.1 (can be found with `npm list -g crisper`)
|
- crisper: 2.0.1 (can be found with `npm list -g crisper`)
|
||||||
- uglifyjs: 2.4.10 (can be found with `uglifyjs --version`)
|
- 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
|
## Installing required software
|
||||||
|
|
||||||
@@ -28,11 +29,11 @@ $ npm config set -g prefix "$HOME/node_modules"
|
|||||||
Then install the required modules:
|
Then install the required modules:
|
||||||
|
|
||||||
```bash
|
```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'
|
Ultimately, all that is required to run this script is that the node binaries
|
||||||
and `vulcanize` are on your `$PATH`.
|
listed above are on your $PATH.
|
||||||
|
|
||||||
## Combining resources with vulcanize
|
## Combining resources with vulcanize
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user