File: //opt/code/node_modules/vue-loader/node_modules/js-beautify/package.json
{
"name": "js-beautify",
"version": "1.7.5",
"description": "jsbeautifier.org for node",
"main": "js/index.js",
"bin": {
"css-beautify": "./js/bin/css-beautify.js",
"html-beautify": "./js/bin/html-beautify.js",
"js-beautify": "./js/bin/js-beautify.js"
},
"directories": {
"lib": "js/lib",
"test": "js/test"
},
"scripts": {},
"bugs": {
"url": "https://github.com/beautify-web/js-beautify/issues"
},
"homepage": "http://jsbeautifier.org/",
"repository": {
"type": "git",
"url": "git://github.com/beautify-web/js-beautify.git"
},
"keywords": [
"beautify",
"beautifier",
"code-quality"
],
"author": {
"name": "Einar Lielmanis",
"email": "einar@jsbeautifier.org"
},
"contributors": [
{
"name": "Vital Batmanov",
"email": "vital76@gmail.com"
},
{
"name": "Chris J. Shull",
"email": "chrisjshull@gmail.com"
},
{
"name": "Gian Marco Gherardi",
"email": "gianmarco.gherardi@gmail.com"
},
{
"name": "Stan",
"email": "stasson@orc.ru"
},
{
"name": "Vittorio Gambaletta",
"email": "VittGam@vittgam.net"
},
{
"name": "Daniel Stockman",
"email": "daniel.stockman@gmail.com"
},
{
"name": "Harutyun Amirjanyan",
"email": "amirjanyan@gmail.com"
},
{
"name": "Nochum Sossonko",
"email": "nsossonko@hotmail.com"
},
{
"name": "Liam Newman",
"email": "bitwiseman@gmail.com"
}
],
"license": "MIT",
"dependencies": {
"config-chain": "~1.1.5",
"editorconfig": "^0.13.2",
"mkdirp": "~0.5.0",
"nopt": "~3.0.1"
},
"devDependencies": {
"benchmark": "2.1.0",
"jshint": "~2.9.1",
"mustache": "~2.2.1",
"node-static": "~0.7.1",
"requirejs": "^2.3.3",
"webpack": "^2.2.1"
},
"readme": "# JS Beautifier\n[](http://travis-ci.org/beautify-web/js-beautify)\n[](https://ci.appveyor.com/project/beautify-web/js-beautify/branch/master)\n\n[](https://pypi.python.org/pypi/jsbeautifier)\n[](https://cdnjs.com/libraries/js-beautify)\n[](https://www.npmjs.com/package/js-beautify)\n[](https://www.npmjs.com/package/js-beautify)\n\n[](https://gitter.im/beautify-web/js-beautify?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[](https://twitter.com/intent/user?screen_name=js_beautifier)\n\n[](https://www.npmjs.org/package/js-beautify)\n\n\nThis little beautifier will reformat and reindent bookmarklets, ugly\nJavaScript, unpack scripts packed by Dean Edward’s popular packer,\nas well as deobfuscate scripts processed by\n[javascriptobfuscator.com](http://javascriptobfuscator.com/).\n\n# Usage\nYou can beautify javascript using JS Beautifier in your web browser, or on the command-line using node.js or python.\n\nJS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries/js-beautify) and rawgit.\n\nTo pull from one of these services include one set of the script tags below in your document:\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify.js\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify-css.js\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify-html.js\"></script>\n\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify.min.js\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify-css.min.js\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify-html.min.js\"></script>\n\n<script src=\"https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.5/js/lib/beautify.js\"></script>\n<script src=\"https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.5/js/lib/beautify-css.js\"></script>\n<script src=\"https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.5/js/lib/beautify-html.js\"></script>\n```\nDisclaimer: These are free services, so there are [no uptime or support guarantees](https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions#i-need-guaranteed-100-uptime-should-i-use-cdnrawgitcom).\n\n## Web Browser\nOpen [jsbeautifier.org](http://jsbeautifier.org/). Options are available via the UI.\n\n## Python\nTo beautify using python:\n\n```bash\n$ pip install jsbeautifier\n$ js-beautify file.js\n```\n\nBeautified output goes to `stdout`.\n\nTo use `jsbeautifier` as a library is simple:\n\n``` python\nimport jsbeautifier\nres = jsbeautifier.beautify('your javascript string')\nres = jsbeautifier.beautify_file('some_file.js')\n```\n\n...or, to specify some options:\n\n``` python\nopts = jsbeautifier.default_options()\nopts.indent_size = 2\nres = jsbeautifier.beautify('some javascript', opts)\n```\n\n## JavaScript\n\nAs an alternative to the Python script, you may install the NPM package `js-beautify`. When installed globally, it provides an executable `js-beautify` script. As with the Python script, the beautified result is sent to `stdout` unless otherwise configured.\n\n```bash\n$ npm -g install js-beautify\n$ js-beautify foo.js\n```\n\nYou can also use `js-beautify` as a `node` library (install locally, the `npm` default):\n\n```bash\n$ npm install js-beautify\n```\n\n```js\nvar beautify = require('js-beautify').js_beautify,\n fs = require('fs');\n\nfs.readFile('foo.js', 'utf8', function (err, data) {\n if (err) {\n throw err;\n }\n console.log(beautify(data, { indent_size: 2 }));\n});\n```\n\n## Options\n\nThese are the command-line flags for both Python and JS scripts:\n\n```text\nCLI Options:\n -f, --file Input file(s) (Pass '-' for stdin)\n -r, --replace Write output in-place, replacing input\n -o, --outfile Write output to file (default stdout)\n --config Path to config file\n --type [js|css|html] [\"js\"]\n -q, --quiet Suppress logging to stdout\n -h, --help Show this help\n -v, --version Show the version\n\nBeautifier Options:\n -s, --indent-size Indentation size [4]\n -c, --indent-char Indentation character [\" \"]\n -t, --indent-with-tabs Indent with tabs, overrides -s and -c\n -e, --eol Character(s) to use as line terminators.\n [first newline in file, otherwise \"\\n]\n -n, --end-with-newline End output with newline\n --editorconfig Use EditorConfig to set up the options\n -l, --indent-level Initial indentation level [0]\n -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)\n -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]\n -P, --space-in-paren Add padding spaces within paren, ie. f( a, b )\n -E, --space-in-empty-paren Add a single space inside empty paren, ie. f( )\n -j, --jslint-happy Enable jslint-stricter mode\n -a, --space-after-anon-function Add a space before an anonymous function's parens, ie. function ()\n -b, --brace-style [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]\n -u, --unindent-chained-methods Don't indent chained method calls\n -B, --break-chained-methods Break chained method calls across subsequent lines\n -k, --keep-array-indentation Preserve array indentation\n -x, --unescape-strings Decode printable characters encoded in xNN notation\n -w, --wrap-line-length Wrap lines at next opportunity after N characters [0]\n -X, --e4x Pass E4X xml literals through untouched\n --good-stuff Warm the cockles of Crockford's heart\n -C, --comma-first Put commas at the beginning of new line instead of end\n -O, --operator-position Set operator position (before-newline|after-newline|preserve-newline) [before-newline]\n```\n\nWhich correspond to the underscored option keys for both library interfaces\n\n**defaults per CLI options**\n```json\n{\n \"indent_size\": 4,\n \"indent_char\": \" \",\n \"indent_with_tabs\": false,\n \"eol\": \"\\n\",\n \"end_with_newline\": false,\n \"indent_level\": 0,\n \"preserve_newlines\": true,\n \"max_preserve_newlines\": 10,\n \"space_in_paren\": false,\n \"space_in_empty_paren\": false,\n \"jslint_happy\": false,\n \"space_after_anon_function\": false,\n \"brace_style\": \"collapse\",\n \"unindent_chained_methods\": false,\n \"break_chained_methods\": false,\n \"keep_array_indentation\": false,\n \"unescape_strings\": false,\n \"wrap_line_length\": 0,\n \"e4x\": false,\n \"comma_first\": false,\n \"operator_position\": \"before-newline\"\n}\n```\n\n**defaults not exposed in the cli**\n```json\n{\n \"eval_code\": false,\n \"space_before_conditional\": true\n}\n```\n\nNotice not all defaults are exposed via the CLI. Historically, the Python and\nJS APIs have not been 100% identical. For example, `space_before_conditional` is\ncurrently JS-only, and not addressable from the CLI script. There are still a\nfew other additional cases keeping us from 100% API-compatibility.\n\n\n### Loading settings from environment or .jsbeautifyrc (JavaScript-Only)\n\nIn addition to CLI arguments, you may pass config to the JS executable via:\n\n * any `jsbeautify_`-prefixed environment variables\n * a `JSON`-formatted file indicated by the `--config` parameter\n * a `.jsbeautifyrc` file containing `JSON` data at any level of the filesystem above `$PWD`\n\nConfiguration sources provided earlier in this stack will override later ones.\n\n### Setting inheritance and Language-specific overrides\n\nThe settings are a shallow tree whose values are inherited for all languages, but\ncan be overridden. This works for settings passed directly to the API in either implementation.\nIn the Javascript implementation, settings loaded from a config file, such as .jsbeautifyrc,\ncan also use inheritance/overriding. \n\nBelow is an example configuration tree showing all the supported locations\nfor language override nodes. We'll use `indent_size` to discuss how this configuration\nwould behave, but any number of settings can be inherited or overridden:\n\n```json\n{\n \"indent_size\": 4,\n \"html\": {\n \"end_with_newline\": true,\n \"js\": {\n \"indent_size\": 2\n },\n \"css\": {\n \"indent_size\": 2\n }\n },\n \"css\": {\n \"indent_size\": 1\n },\n \"js\": {\n \"preserve-newlines\": true\n }\n}\n```\n\nUsing the above example would have the following result:\n\n* HTML files\n * Inherit `indent_size` of 4 spaces from the top-level setting. \n * The files would also end with a newline.\n * JavaScript and CSS inside HTML\n * Inherit the HTML `end_with_newline` setting\n * Override their indentation to 2 spaces\n* CSS files\n * Override the top-level setting to an `indent_size` of 1 space.\n* JavaScript files\n * Inherit `indent_size` of 4 spaces from the top-level setting\n * Set `preserve-newlines` to `true`\n\n### CSS & HTML\n\nIn addition to the `js-beautify` executable, `css-beautify` and `html-beautify`\nare also provided as an easy interface into those scripts. Alternatively,\n`js-beautify --css` or `js-beautify --html` will accomplish the same thing, respectively.\n\n```js\n// Programmatic access\nvar beautify_js = require('js-beautify'); // also available under \"js\" export\nvar beautify_css = require('js-beautify').css;\nvar beautify_html = require('js-beautify').html;\n\n// All methods accept two arguments, the string to be beautified, and an options object.\n```\n\nThe CSS & HTML beautifiers are much simpler in scope, and possess far fewer options.\n\n```text\nCSS Beautifier Options:\n -s, --indent-size Indentation size [4]\n -c, --indent-char Indentation character [\" \"]\n -t, --indent-with-tabs Indent with tabs, overrides -s and -c\n -e, --eol Character(s) to use as line terminators. (default newline - \"\\\\n\")\n -n, --end-with-newline End output with newline\n -L, --selector-separator-newline Add a newline between multiple selectors\n -N, --newline-between-rules Add a newline between CSS rules\n\nHTML Beautifier Options:\n -s, --indent-size Indentation size [4]\n -c, --indent-char Indentation character [\" \"]\n -t, --indent-with-tabs Indent with tabs, overrides -s and -c\n -e, --eol Character(s) to use as line terminators. (default newline - \"\\\\n\")\n -n, --end-with-newline End output with newline\n -p, --preserve-newlines Preserve existing line-breaks (--no-preserve-newlines disables)\n -m, --max-preserve-newlines Maximum number of line-breaks to be preserved in one chunk [10]\n -I, --indent-inner-html Indent <head> and <body> sections. Default is false.\n -b, --brace-style [collapse-preserve-inline|collapse|expand|end-expand|none] [\"collapse\"]\n -S, --indent-scripts [keep|separate|normal] [\"normal\"]\n -w, --wrap-line-length Maximum characters per line (0 disables) [250]\n -A, --wrap-attributes Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline] [\"auto\"]\n -i, --wrap-attributes-indent-size Indent wrapped attributes to after N characters [indent-size] (ignored if wrap-attributes is \"force-aligned\")\n -U, --unformatted List of tags (defaults to inline) that should not be reformatted\n -T, --content_unformatted List of tags (defaults to pre) whose content should not be reformatted\n -E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline before them.\n --editorconfig Use EditorConfig to set up the options\n```\n\n## Directives to Ignore or Preserve sections (Javascript only)\n\nBeautifier for supports directives in comments inside the file.\nThis allows you to tell the beautifier to preserve the formatting of or completely ignore part of a file.\nThe example input below will remain changed after beautification\n\n```js\n// Use preserve when the content is not javascript, but you don't want it reformatted.\n/* beautify preserve:start */\n{\n browserName: 'internet explorer',\n platform: 'Windows 7',\n version: '8'\n}\n/* beautify preserve:end */\n\n// Use ignore when the content is not parsable as javascript.\nvar a = 1;\n/* beautify ignore:start */\n {This is some strange{template language{using open-braces?\n/* beautify ignore:end */\n```\n\n# License\n\nYou are free to use this in any way you want, in case you find this\nuseful or working for you but you must keep the copyright notice and license. (MIT)\n\n# Credits\n\n* Created by Einar Lielmanis, <einar@jsbeautifier.org>\n* Python version flourished by Stefano Sanfilippo <a.little.coder@gmail.com>\n* Command-line for node.js by Daniel Stockman <daniel.stockman@gmail.com>\n* Maintained and expanded by Liam Newman <bitwiseman@gmail.com>\n\nThanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, Dave\nVasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,\nMathias Bynens, Vittorio Gambaletta and others.\n\n(README.md: js-beautify@1.7.5)\n",
"readmeFilename": "README.md",
"_id": "js-beautify@1.7.5",
"dist": {
"shasum": "52ba8ffbb25a691d5b87947204b94019b0c502e6"
},
"_from": "js-beautify@^1.6.3",
"_resolved": "http://registry.npmjs.org/js-beautify/-/js-beautify-1.7.5.tgz"
}