OLD | NEW |
(Empty) | |
| 1 # Vulcanizing Material Design downloads |
| 2 |
| 3 `vulcanize` is an npm module used to combine resources. In order to make the |
| 4 Material Design downloads page sufficiently fast, we run vulcanize on the source |
| 5 files to combine them and reduce blocking load/parse time. |
| 6 |
| 7 ## Required software |
| 8 |
| 9 Vulcanization currently requires: |
| 10 - node.js: v0.10.25 (can be found with `node --version`) |
| 11 - npm: 1.3.10 (can be found with `npm --version`) |
| 12 - vulcanize: 1.12.3 (can be found with `vulcanize --version`) |
| 13 - crisper: 1.0.7 (can be found with `npm info crisper`) |
| 14 |
| 15 ## Installing required software |
| 16 |
| 17 For instructions on installing node and npm, see |
| 18 [here](https://docs.npmjs.com/getting-started/installing-node). |
| 19 |
| 20 Once you've installed npm, you can get `crisper` and `vulcanize` via: |
| 21 |
| 22 ```bash |
| 23 $ sudo npm install -g crisper vulcanize |
| 24 ``` |
| 25 |
| 26 ## Combining resources with vulcanize |
| 27 |
| 28 To combine all the CSS/HTML/JS for the downloads page to make it production |
| 29 fast, you can run the commands: |
| 30 |
| 31 ```bash |
| 32 $ chrome/browser/resources/md_downloads/vulcanize.py # from src/ |
| 33 ``` |
| 34 |
| 35 This should overwrite the following files: |
| 36 |
| 37 - chrome/browser/resources/md_downloads/ |
| 38 - vulcanized.html (all <link rel=import> and stylesheets inlined) |
| 39 - crisper.js (all JavaScript, extracted from vulcanized.html) |
| 40 |
| 41 ## Testing downloads without vulcanizing |
| 42 |
| 43 If you're locally working on the downloads page, you can simply load this URL to |
| 44 bypass the vulcanized version: `chrome://downloads/dev.html` |
OLD | NEW |