mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-23 20:59:43 +00:00
Update README grammar and word choice
This commit is contained in:
parent
b714a349f5
commit
85936fe205
25
README.md
25
README.md
@ -13,17 +13,17 @@
|
||||
[![NPM stats](https://nodei.co/npm/js-beautify.svg?downloadRank=true&downloads=true)](https://www.npmjs.org/package/js-beautify)
|
||||
|
||||
|
||||
This little beautifier will reformat and reindent bookmarklets, ugly
|
||||
This little beautifier will reformat and re-indent bookmarklets, ugly
|
||||
JavaScript, unpack scripts packed by Dean Edward’s popular packer,
|
||||
as well as deobfuscate scripts processed by
|
||||
[javascriptobfuscator.com](http://javascriptobfuscator.com/).
|
||||
|
||||
# Contributors Needed
|
||||
I'm putting this front and center above because existing owners have very limited time to work on this project currently.
|
||||
This is a popular project and widely used but it desperately needs contributors who have time to commit to fixing both
|
||||
This is a popular project and widely used but it desperately needs contributors who have time to commit to fixing both
|
||||
customer facing bugs and underlying problems with the internal design and implementation.
|
||||
|
||||
If you are interested, please take a look at the [CONTRIBUTING.md](https://github.com/beautify-web/js-beautify/blob/master/CONTRIBUTING.md) then fix an issue marked with the ["Good first issue"](https://github.com/beautify-web/js-beautify/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label and submit a PR. Repeat as often as possible. Thanks!
|
||||
If you are interested, please take a look at the [CONTRIBUTING.md](https://github.com/beautify-web/js-beautify/blob/master/CONTRIBUTING.md) then fix an issue marked with the ["Good first issue"](https://github.com/beautify-web/js-beautify/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label and submit a PR. Repeat as often as possible. Thanks!
|
||||
|
||||
|
||||
# Usage
|
||||
@ -94,7 +94,7 @@ You can also use `js-beautify` as a `node` library (install locally, the `npm` d
|
||||
$ npm install js-beautify
|
||||
```
|
||||
|
||||
Import and call the approriate beautifier method for javascript (js), css, or html. All three method signatures are `beautify(code, options)`. `code` is a the string of code to be beautified. options is an object with the settings you would like used to beautify the code.
|
||||
Import and call the appropriate beautifier method for javascript (js), css, or html. All three method signatures are `beautify(code, options)`. `code` is the string of code to be beautified. options is an object with the settings you would like used to beautify the code.
|
||||
|
||||
The configuration option names are the same as the CLI names but with underscores instead of dashes. For example, `--indent-size 2 --space-in-empty-paren` would be `{ indent_size: 2, space_in_empty_paren: true }`.
|
||||
|
||||
@ -210,12 +210,10 @@ Configuration sources provided earlier in this stack will override later ones.
|
||||
|
||||
The settings are a shallow tree whose values are inherited for all languages, but
|
||||
can be overridden. This works for settings passed directly to the API in either implementation.
|
||||
In the Javascript implementation, settings loaded from a config file, such as .jsbeautifyrc,
|
||||
can also use inheritance/overriding.
|
||||
In the Javascript implementation, settings loaded from a config file, such as .jsbeautifyrc, can also use inheritance/overriding.
|
||||
|
||||
Below is an example configuration tree showing all the supported locations
|
||||
for language override nodes. We'll use `indent_size` to discuss how this configuration
|
||||
would behave, but any number of settings can be inherited or overridden:
|
||||
for language override nodes. We'll use `indent_size` to discuss how this configuration would behave, but any number of settings can be inherited or overridden:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -244,13 +242,13 @@ Using the above example would have the following result:
|
||||
* Inherit `indent_size` of 4 spaces from the top-level setting.
|
||||
* The files would also end with a newline.
|
||||
* JavaScript and CSS inside HTML
|
||||
* Inherit the HTML `end_with_newline` setting
|
||||
* Override their indentation to 2 spaces
|
||||
* Inherit the HTML `end_with_newline` setting.
|
||||
* Override their indentation to 2 spaces.
|
||||
* CSS files
|
||||
* Override the top-level setting to an `indent_size` of 1 space.
|
||||
* JavaScript files
|
||||
* Inherit `indent_size` of 4 spaces from the top-level setting
|
||||
* Set `preserve-newlines` to `true`
|
||||
* Inherit `indent_size` of 4 spaces from the top-level setting.
|
||||
* Set `preserve-newlines` to `true`.
|
||||
|
||||
### CSS & HTML
|
||||
|
||||
@ -324,8 +322,7 @@ var a = 1;
|
||||
|
||||
# License
|
||||
|
||||
You are free to use this in any way you want, in case you find this
|
||||
useful or working for you but you must keep the copyright notice and license. (MIT)
|
||||
You are free to use this in any way you want, in case you find this useful or working for you but you must keep the copyright notice and license. (MIT)
|
||||
|
||||
# Credits
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user