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

Unified Diff: tools/vulcanize/node_modules/vulcanize/package.json

Issue 125733002: Add vulcanize to tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/vulcanize/node_modules/vulcanize/package.json
diff --git a/tools/vulcanize/node_modules/vulcanize/package.json b/tools/vulcanize/node_modules/vulcanize/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..03d47824e38285175281677cdcba58ab3d3cae57
--- /dev/null
+++ b/tools/vulcanize/node_modules/vulcanize/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "vulcanize",
+ "version": "0.1.9",
+ "description": "Process Web Components into one output file",
+ "main": "lib/vulcan.js",
+ "bin": {
+ "vulcanize": "bin/vulcanize"
+ },
+ "dependencies": {
+ "cheerio": "~0.12.1",
+ "nopt": "~2.1.1"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": {
+ "name": "Daniel Freedman"
+ },
+ "license": "BSD",
+ "directories": {
+ "test": "test"
+ },
+ "keywords": [
+ "web components",
+ "polymer"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Polymer/vulcanize.git"
+ },
+ "bugs": {
+ "url": "https://github.com/Polymer/vulcanize/issues"
+ },
+ "contributors": [
+ {
+ "name": "Google Inc.",
+ "email": "*@google.com"
+ }
+ ],
+ "readme": "# Vulcanize\n\n### Concatenate a set of Web Components into one file\n\n>Named for the [Vulcanization](http://en.wikipedia.org/wiki/Vulcanization) process that turns polymers into more durable\nmaterials.\n\n## Installation\n\n`vulcanize` is available on npm. For maximium utility, `vulcanize` should be installed globally.\n\n sudo npm install -g vulcanize\n\nThis will install `vulcanize` to `/usr/local/bin/vulcanize`.\n\n## Usage\n\n vulcanize index.html\n\nAt the simplest, `vulcanize` only requires an html file as an argument. The optimized output file will be named\n`vulcanized.html`.\n\nIf you want to control the output name, use the `-o` flag\n\n vulcanize -o build.html index.html\n\nMost URLs will be automatically adjusted by the vulcanizer.\n\n\n## Options\n\n- `--output`, `-o`\n - Output file name (defaults to vulcanized.html)\n- `--verbose`, `-v`\n - More verbose logging\n- `--help`, `-v`, `-?`\n - Print this message\n- `--config`\n - Read a given config file\n- `--strip`, `-s`\n - Remove comments and empty text nodes\n- `--csp`\n - Extract inline scripts to a separate file (uses `<output file name>`.js)\n- `--inline`\n - The opposite of CSP mode, inline all assets (script and css) into the document\n\n## Config\n> JSON file for additional options\n\n- Excludes: Exclude the selected urls from vulcanization (urls are still deduplicated for imports).\n\n### Example Config\n```json\n{\n \"excludes\": {\n \"imports\": [\n \"regex-to-exclude\"\n ]\n }\n}\n```\n\n## Example Usage\n\nSay we have three html files: `index.html`, `x-app.html`, and `x-dep.html`.\n\nindex.html:\n\n```html\n<!DOCTYPE html>\n<link rel=\"import\" href=\"app.html\">\n<x-app></x-app>\n```\n\napp.html:\n\n```html\n<link rel=\"import\" href=\"path/to/x-dep.html\">\n<polymer-element name=\"x-app\">\n <template>\n <x-dep></x-dep>\n </template>\n <script>Polymer('x-app')</script>\n</polymer-element>\n```\n\nx-dep.html:\n\n```html\n<polymer-element name=\"x-dep\">\n <template>\n <img src=\"x-dep-icon.jpg\">\n </template>\n <script>\n Polymer('x-dep');\n </script>\n</polymer-element>\n```\n\nRunning vulcan on `index.html`, and specifying `build.html` as the output:\n\n vulcanize -o build.html index.html\n\nWill result in `build.html` that appears as so:\n\n```html\n<!DOCTYPE html>\n<polymer-element name=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <img src=\"path/to/x-dep-icon.jpg\">\n </template>\n <script>\n Polymer('x-dep');\n </script>\n</polymer-element>\n<polymer-element name=\"x-app\" assetpath=\"\">\n <template>\n <x-dep></x-dep>\n </template>\n <script>\n Polymer('x-app');\n </script>\n</polymer-element>\n<x-app></x-app>\n```\n\n## Content Security Policy\n[Content Security Policy](http://en.wikipedia.org/wiki/Content_Security_Policy), or CSP, is a Javascript security model\nthat aims to prevent XSS and other attacks. In so doing, it prohibits the use of inline scripts.\n\nTo help automate the use of Polymer element registration with CSP, the `--csp` flag to vulcan will remove all scripts\nfrom the HTML Imports and place their contents into an output javascript file.\n\nUsing the previous example, the output from `vulcanize --csp -o build.html index.html` will be\n\nbuild.html:\n```html\n<!DOCTYPE html>\n<polymer-element name=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <img src=\"path/to/x-dep-icon.jpg\">\n </template>\n</polymer-element>\n<polymer-element name=\"x-app\" assetpath=\"\">\n <template>\n <x-dep></x-dep>\n </template>\n</polymer-element>\n<script src=\"build.js\"></script>\n<x-app></x-app>\n```\n\nbuild.js:\n```js\nPolymer('x-dep');\nPolymer('x-app');\n```\n",
+ "readmeFilename": "README.md",
+ "homepage": "https://github.com/Polymer/vulcanize",
+ "_id": "vulcanize@0.1.9",
+ "_from": "vulcanize@"
+}

Powered by Google App Engine
This is Rietveld 408576698