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

Side by Side 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 unified diff | Download patch
OLDNEW
1 { 1 {
2 "name": "vulcanize", 2 "name": "vulcanize",
3 "version": "0.7.4", 3 "version": "0.7.6",
4 "description": "Process Web Components into one output file", 4 "description": "Process Web Components into one output file",
5 "main": "lib/vulcan.js", 5 "main": "lib/vulcan.js",
6 "bin": { 6 "bin": {
7 "vulcanize": "bin/vulcanize" 7 "vulcanize": "bin/vulcanize"
8 }, 8 },
9 "dependencies": { 9 "dependencies": {
10 "cssom": "^0.2.3",
11 "nopt": "^3.0.1", 10 "nopt": "^3.0.1",
12 "uglify-js": "^2.4.15", 11 "uglify-js": "^2.4.15",
13 "whacko": "0.17.2", 12 "whacko": "0.17.2",
14 "update-notifier": "^0.2.2" 13 "update-notifier": "^0.2.2"
15 }, 14 },
16 "devDependencies": { 15 "devDependencies": {
17 "jshint": "^2.5.6", 16 "jshint": "^2.5.6",
18 "mocha": "^2.0.1" 17 "mocha": "^2.0.1"
19 }, 18 },
20 "scripts": { 19 "scripts": {
(...skipping 16 matching lines...) Expand all
37 }, 36 },
38 "bugs": { 37 "bugs": {
39 "url": "https://github.com/Polymer/vulcanize/issues" 38 "url": "https://github.com/Polymer/vulcanize/issues"
40 }, 39 },
41 "optionalDependencies": { 40 "optionalDependencies": {
42 "update-notifier": "^0.2.2" 41 "update-notifier": "^0.2.2"
43 }, 42 },
44 "readme": "[![NPM version](http://img.shields.io/npm/v/vulcanize.svg)](https:/ /npmjs.org/package/vulcanize)\n[![Build Status](http://img.shields.io/travis/Pol ymer/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 [Vulcani zation](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/vu lcanize`.\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 n amed\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 automatical ly adjusted by the vulcanizer.\n\n\n## Options\n\n- `--output`, `-o`\n - Outpu t file name (defaults to vulcanized.html)\n- `--verbose`, `-v`\n - More verbos e logging\n- `--help`, `-v`, `-?`\n - Print this message\n- `--config`\n - Re ad a given config file\n- `--strip`, `-s`\n - Remove comments and empty text no des\n- `--csp`\n - Extract inline scripts to a separate file (uses `<output fi le name>`.js)\n- `--inline`\n - The opposite of CSP mode, inline all assets (s cript and css) into the document\n- `--inline --csp`\n - Bundle all javascript (inline and external) into `<output file name>`.js\n- `--abspath`, `-p`\n - Spe cify site root. Resolve paths to absolute paths based on site root\n- `--no-stri p-excludes`\n - Keep imports excluded from inlining\n- `--version`, ` -V`\n - print version information\n\n## Additional options when used as Node module\n\nI n addition to the above options, `vulcan` when used as Node module has additiona l options for string-based rather than file-based document processing. These are :\n\n- `inputSrc`\n - The document to process, represented as String, String Bu ffer, or any Object with a `toString` function that yields valid HTML souce. Imp orts are resolved relative to the directory in which the node process was starte d.\n- `outputHandler`\n - An output handler function to call rather than writin g the processing result to file. The handler must be of the form `function(filen ame, 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 outp uthandler is used.\n\nAn example of using these options is shown below:\n\n```\n var 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 + b ody + \"</html>\";\n\nvar outputHandler = function(filename, data) {\n console. log(data);\n};\n\nvulcan.setOptions({inputSrc: input, outputHandler: outputHandl er}, 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 add itional options\n\n- Excludes: Remove the selected urls from the vulcanized bund le:\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 s rc=\"x-dep-icon.jpg\">\n </template>\n <script>\n Polymer('x-dep');\n </sc ript>\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 r esult in `build.html` that appears as so:\n\n```html\n<!DOCTYPE html>\n<div hidd en><polymer-element name=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <i mg 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<polyme r-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 securi ty 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 regist ration with CSP, the `--csp` flag to vulcan will remove all scripts\nfrom the HT ML 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` wi ll be\n\nbuild.html:\n```html\n<!DOCTYPE html>\n<div hidden><polymer-element nam e=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <img src=\"http://www.pol ymer-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 sr c=\"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 reformatti ng, 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 a ctivated by using the `--strip` option.\n\nUsing the previous example, the outpu t 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\" assetpat h=\"path/to/\"><template><img src=\"http://www.polymer-project.org/images/logos/ p-logo.svg\"></template></polymer-element><polymer-element name=\"x-app\" assetp ath=\"\"><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\");Pol ymer(\"x-app\");\n```\n\n[![Analytics](https://ga-beacon.appspot.com/UA-39334307 -2/Polymer/vulcanize/README)](https://github.com/igrigorik/ga-beacon)\n", 43 "readme": "[![NPM version](http://img.shields.io/npm/v/vulcanize.svg)](https:/ /npmjs.org/package/vulcanize)\n[![Build Status](http://img.shields.io/travis/Pol ymer/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 [Vulcani zation](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/vu lcanize`.\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 n amed\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 automatical ly adjusted by the vulcanizer.\n\n\n## Options\n\n- `--output`, `-o`\n - Outpu t file name (defaults to vulcanized.html)\n- `--verbose`, `-v`\n - More verbos e logging\n- `--help`, `-v`, `-?`\n - Print this message\n- `--config`\n - Re ad a given config file\n- `--strip`, `-s`\n - Remove comments and empty text no des\n- `--csp`\n - Extract inline scripts to a separate file (uses `<output fi le name>`.js)\n- `--inline`\n - The opposite of CSP mode, inline all assets (s cript and css) into the document\n- `--inline --csp`\n - Bundle all javascript (inline and external) into `<output file name>`.js\n- `--abspath`, `-p`\n - Spe cify site root. Resolve paths to absolute paths based on site root\n- `--no-stri p-excludes`\n - Keep imports excluded from inlining\n- `--version`, ` -V`\n - print version information\n\n## Additional options when used as Node module\n\nI n addition to the above options, `vulcan` when used as Node module has additiona l options for string-based rather than file-based document processing. These are :\n\n- `inputSrc`\n - The document to process, represented as String, String Bu ffer, or any Object with a `toString` function that yields valid HTML souce. Imp orts are resolved relative to the directory in which the node process was starte d.\n- `outputHandler`\n - An output handler function to call rather than writin g the processing result to file. The handler must be of the form `function(filen ame, 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 outp uthandler is used.\n\nAn example of using these options is shown below:\n\n```\n var 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 + b ody + \"</html>\";\n\nvar outputHandler = function(filename, data) {\n console. log(data);\n};\n\nvulcan.setOptions({inputSrc: input, outputHandler: outputHandl er}, 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 add itional options\n\n- Excludes: Remove the selected urls from the vulcanized bund le:\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 s rc=\"x-dep-icon.jpg\">\n </template>\n <script>\n Polymer('x-dep');\n </sc ript>\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 r esult in `build.html` that appears as so:\n\n```html\n<!DOCTYPE html>\n<div hidd en><polymer-element name=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <i mg 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<polyme r-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 securi ty 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 regist ration with CSP, the `--csp` flag to vulcan will remove all scripts\nfrom the HT ML 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` wi ll be\n\nbuild.html:\n```html\n<!DOCTYPE html>\n<div hidden><polymer-element nam e=\"x-dep\" assetpath=\"path/to/\">\n <template>\n <img src=\"http://www.pol ymer-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 sr c=\"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 reformatti ng, 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 a ctivated by using the `--strip` option.\n\nUsing the previous example, the outpu t 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\" assetpat h=\"path/to/\"><template><img src=\"http://www.polymer-project.org/images/logos/ p-logo.svg\"></template></polymer-element><polymer-element name=\"x-app\" assetp ath=\"\"><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\");Pol ymer(\"x-app\");\n```\n\n[![Analytics](https://ga-beacon.appspot.com/UA-39334307 -2/Polymer/vulcanize/README)](https://github.com/igrigorik/ga-beacon)\n",
45 "readmeFilename": "README.md", 44 "readmeFilename": "README.md",
46 "homepage": "https://github.com/Polymer/vulcanize", 45 "homepage": "https://github.com/Polymer/vulcanize",
47 "_id": "vulcanize@0.7.4", 46 "_id": "vulcanize@0.7.6",
48 "_from": "vulcanize@" 47 "dist": {
48 "shasum": "7ab198342da088da9510a0d9b1ee905aae27ac83"
49 },
50 "_from": "vulcanize@0.7.6",
51 "_resolved": "https://registry.npmjs.org/vulcanize/-/vulcanize-0.7.6.tgz"
49 } 52 }
OLDNEW
« 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