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

Unified Diff: node_modules/vulcanize/package.json

Issue 877193002: Upgrade vulcanize to 0.7.6. (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 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
« no previous file with comments | « node_modules/vulcanize/node_modules/whacko/package.json ('k') | node_modules/vulcanize/test/test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: node_modules/vulcanize/package.json
diff --git a/node_modules/vulcanize/package.json b/node_modules/vulcanize/package.json
index 7163a015f55332a003e5339772c890869dc49f2e..68995fada9e644768ac9b01f297cf0d022247e76 100644
--- a/node_modules/vulcanize/package.json
+++ b/node_modules/vulcanize/package.json
@@ -1,13 +1,12 @@
{
"name": "vulcanize",
- "version": "0.7.4",
+ "version": "0.7.6",
"description": "Process Web Components into one output file",
"main": "lib/vulcan.js",
"bin": {
"vulcanize": "bin/vulcanize"
},
"dependencies": {
- "cssom": "^0.2.3",
"nopt": "^3.0.1",
"uglify-js": "^2.4.15",
"whacko": "0.17.2",
@@ -44,6 +43,10 @@
"readme": "[![NPM version](http://img.shields.io/npm/v/vulcanize.svg)](https://npmjs.org/package/vulcanize)\n[![Build Status](http://img.shields.io/travis/Polymer/vulcanize.svg)](https://travis-ci.org/Polymer/vulcanize)\n\n# 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- `--inline --csp`\n - Bundle all javascript (inline and external) into `<output file name>`.js\n- `--abspath`, `-p`\n - Specify site root. Resolve paths to absolute paths based on site root\n- `--no-strip-excludes`\n - Keep imports excluded from inlining\n- `--version`, ` -V`\n - print version information\n\n## Additional options when used as Node module\n\nIn addition to the above options, `vulcan` when used as Node module has additional options for string-based rather than file-based document processing. These are:\n\n- `inputSrc`\n - The document to process, represented as String, String Buffer, or any Object with a `toString` function that yields valid HTML souce. Imports are resolved relative to the directory in which the node process was started.\n- `outputHandler`\n - An output handler function to call rather than writing the processing result to file. The handler must be of the form `function(filename, data)`, which is called with the following arguments:\n - `filename`\n - The file that vulcanize would create if it were running in file I/O mode.\n - `data`\n - The HTML source that vulcanize writes to file if no outputhandler is used.\n\nAn example of using these options is shown below:\n\n```\nvar vulcan = require(\"./lib/vulcan\");\n\nvar head = \"<head><link rel='import' href='test/html/imports/simple-import.html'></head>\";\nvar body = \"<body><my-element>test</my-element></body>\";\nvar input = \"<!doctype><html>\" + head + body + \"</html>\";\n\nvar outputHandler = function(filename, data) {\n console.log(data);\n};\n\nvulcan.setOptions({inputSrc: input, outputHandler: outputHandler}, function(err) {\n if(err) {\n console.error(err);\n process.exit(1);\n }\n vulcan.processDocument();\n});\n\n```\n\n## Config\n> JSON file for additional options\n\n- Excludes: Remove the selected urls from the vulcanized bundle:\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=\"x-app.html\">\n<x-app></x-app>\n```\n\nx-app.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<div hidden><polymer-element name=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <img src=\"http://www.polymer-project.org/images/logos/p-logo.svg\">\n </template>\n <script>\n Polymer('x-dep');\n </script>\n</polymer-element>\n\n<polymer-element name=\"x-app\" assetpath=\"\">\n <template>\n <x-dep></x-dep>\n </template>\n <script>Polymer('x-app')</script>\n</polymer-element>\n</div>\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<div hidden><polymer-element name=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <img src=\"http://www.polymer-project.org/images/logos/p-logo.svg\">\n </template>\n\n</polymer-element>\n\n<polymer-element name=\"x-app\" assetpath=\"\">\n <template>\n <x-dep></x-dep>\n </template>\n\n</polymer-element>\n</div>\n<x-app></x-app>\n<script src=\"build.js\"></script>\n```\n\nbuild.js:\n```js\n\n Polymer('x-dep');\n ;\nPolymer('x-app')\n```\n\nThe JS files can become a bit messy without reformatting, and semi-colons are inserted between script contents as a\nprecaution.\n\n## Stripping whitespace\n\nVulcanize includes a set of size reducing heuristics to remove unnecessary whitespace and comments in HTML, JS, and CSS.\nThis can be activated by using the `--strip` option.\n\nUsing the previous example, the output from `vulcanize --csp -o build.html --strip index.html` will be\n\nbuild.html:\n```html\n<!DOCTYPE html>\n<div hidden><polymer-element name=\"x-dep\" assetpath=\"path/to/\"><template><img src=\"http://www.polymer-project.org/images/logos/p-logo.svg\"></template></polymer-element><polymer-element name=\"x-app\" assetpath=\"\"><template><x-dep></x-dep></template></polymer-element></div>\n<x-app></x-app>\n<script src=\"build.js\"></script>\n```\n\n```js\nPolymer(\"x-dep\");Polymer(\"x-app\");\n```\n\n[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/vulcanize/README)](https://github.com/igrigorik/ga-beacon)\n",
"readmeFilename": "README.md",
"homepage": "https://github.com/Polymer/vulcanize",
- "_id": "vulcanize@0.7.4",
- "_from": "vulcanize@"
+ "_id": "vulcanize@0.7.6",
+ "dist": {
+ "shasum": "7ab198342da088da9510a0d9b1ee905aae27ac83"
+ },
+ "_from": "vulcanize@0.7.6",
+ "_resolved": "https://registry.npmjs.org/vulcanize/-/vulcanize-0.7.6.tgz"
}
« no previous file with comments | « node_modules/vulcanize/node_modules/whacko/package.json ('k') | node_modules/vulcanize/test/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698