Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: docs/vulcanize.md

Issue 2647203002: Make vulcanize.md more generic and remove specifics about node modules (Closed)
Patch Set: dpapad@ review Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docs/optimizing_web_uis.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Vulcanizing Chrome Polymer UIs
2
3 `vulcanize` is an npm module used to combine resources. In order to make the
4 Material Design downloads and history pages sufficiently fast, we run vulcanize
5 on the source files to combine them and reduce blocking load/parse time.
6
7 ## Required software
8
9 Vulcanization currently requires:
10
11 - node.js: >= v4.4.2 (can be found with `node --version`)
12 - npm: >= 1.3.10 (can be found with `npm --version`)
13 - vulcanize: 1.14.8 (can be found with `vulcanize --version`)
14 - crisper: 2.0.1 (can be found with `npm list -g crisper`)
15 - uglifyjs: 2.4.10 (can be found with `uglifyjs --version`)
16 - polymer-css-build: 0.0.6 (can be found with `npm list -g polymer-css-build`)
17
18 ## Installing required software
19
20 For instructions on installing node and npm, see
21 [here](https://docs.npmjs.com/getting-started/installing-node).
22
23 We recommend telling npm where to store downloaded modules:
24
25 ```bash
26 $ npm config set -g prefix "$HOME/node_modules"
27 ```
28
29 Then install the required modules:
30
31 ```bash
32 $ npm install -g crisper@2.0.1 vulcanize@1.14.8 uglifyjs@2.4.10 \
33 polymer-css-build@0.0.6
34 ```
35
36 Ultimately, all that is required to run this script is that the node binaries
37 listed above are on your $PATH.
38
39 ## Combining resources with vulcanize
40
41 To combine all the CSS/HTML/JS for all pages which use vulcanize, making them
42 production fast, you can run the command:
43
44 ```bash
45 $ chrome/browser/resources/vulcanize.py # from src/
46 ```
47
48 This should overwrite the following files:
49
50 - chrome/browser/resources/md_downloads/
51 - vulcanized.html (all <link rel=import> and stylesheets inlined)
52 - crisper.js (all JavaScript, extracted from vulcanized.html)
53 - chrome/browser/resources/md_history/
54 - app.vulcanized.html
55 - app.crisper.js
56
57 ## Testing downloads without vulcanizing
58
59 Build with `use_vulcanize = false` in your gn args to build without vulcanizing.
OLDNEW
« no previous file with comments | « docs/optimizing_web_uis.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698