You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Older versions are available by changing the version number.
@@ -85,7 +85,7 @@ $ pip install cssbeautifier
85
85
```
86
86
87
87
# Usage
88
-
You can beautify javascript using JS Beautifier in your web browser, or on the command-line using node.js or python.
88
+
You can beautify JavaScript using JS Beautifier in your web browser, or on the command-line using Node.js or Python.
89
89
90
90
## Web Browser
91
91
Open [beautifier.io](https://beautifier.io/). Options are available via the UI.
@@ -101,7 +101,7 @@ When installed globally, the beautifier provides an executable `js-beautify` scr
101
101
$ js-beautify foo.js
102
102
```
103
103
104
-
To use `js-beautify` as a `node` library (after install locally), 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.
104
+
To use `js-beautify` as a `node` library (after install locally), 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.
105
105
106
106
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 }`.
107
107
@@ -130,7 +130,7 @@ To use `jsbeautifier` as a library is simple:
130
130
131
131
```python
132
132
import jsbeautifier
133
-
res = jsbeautifier.beautify('your javascript string')
133
+
res = jsbeautifier.beautify('your JavaScript string')
134
134
res = jsbeautifier.beautify_file('some_file.js')
135
135
```
136
136
@@ -140,7 +140,7 @@ res = jsbeautifier.beautify_file('some_file.js')
140
140
opts = jsbeautifier.default_options()
141
141
opts.indent_size =2
142
142
opts.space_in_empty_paren =True
143
-
res = jsbeautifier.beautify('some javascript', opts)
143
+
res = jsbeautifier.beautify('some JavaScript', opts)
144
144
```
145
145
146
146
The configuration option names are the same as the CLI names but with underscores instead of dashes. The example above would be set on the command-line as `--indent-size 2 --space-in-empty-paren`.
@@ -188,7 +188,7 @@ Beautifier Options:
188
188
-C, --comma-first Put commas at the beginning of new line instead of end
189
189
-O, --operator-position Set operator position (before-newline|after-newline|preserve-newline) [before-newline]
190
190
--indent-empty-lines Keep indentation on empty lines
191
-
--templating List of templating languages (auto,django,erb,handlebars,php,smarty) ["auto"] auto = none in JavaScript, all in html
191
+
--templating List of templating languages (auto,django,erb,handlebars,php,smarty) ["auto"] auto = none in JavaScript, all in HTML
192
192
```
193
193
194
194
Which correspond to the underscored option keys for both library interfaces
@@ -251,7 +251,7 @@ Configuration sources provided earlier in this stack will override later ones.
251
251
252
252
The settings are a shallow tree whose values are inherited for all languages, but
253
253
can be overridden. This works for settings passed directly to the API in either implementation.
254
-
In the Javascript implementation, settings loaded from a config file, such as .jsbeautifyrc, can also use inheritance/overriding.
254
+
In the JavaScript implementation, settings loaded from a config file, such as .jsbeautifyrc, can also use inheritance/overriding.
255
255
256
256
Below is an example configuration tree showing all the supported locations
257
257
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:
@@ -397,4 +397,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
397
397
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
<aclass="self" href="./">Beautify, unpack or deobfuscate JavaScript and HTML, make JSON/JSONP readable, etc.</a>
76
-
</p>
77
-
<p>
78
-
All of the source code is completely free and open, available on <ahref="https://github.com/beautify-web/js-beautify">GitHub</a> under MIT licence,
79
-
<br>and we have a command-line version, <ahref="https://pypi.org/project/jsbeautifier/">python library</a> and a <ahref="https://npmjs.org/package/js-beautify">node package</a> as well.
79
+
<strong>Beautify JavaScript, JSON, React.js, HTML, CSS, SCSS, and SASS</strong>
<pclass="contributor-sep">Written by <ahref="https://github.com/einars">Einar Lielmanis</a>, maintained and evolved by <ahref="https://github.com/bitwiseman/">Liam Newman</a>.</p>
202
+
<pclass="contributor-sep">Created by <ahref="https://github.com/einars">Einar Lielmanis</a>, maintained and evolved by <ahref="https://github.com/bitwiseman/">Liam Newman</a>.</p>
203
+
</p>
204
+
<p>
205
+
All of the source code is completely free and open, available on <ahref="https://github.com/beautify-web/js-beautify">GitHub</a> under MIT licence,
206
+
and we have a command-line version, <ahref="https://pypi.org/project/jsbeautifier/">python library</a> and a <ahref="https://npmjs.org/package/js-beautify">node package</a> as well.
207
+
</p>
197
208
<p>We use the wonderful <ahref="http://codemirror.net">CodeMirror</a> syntax highlighting editor, written by Marijn Haverbeke.</p>
198
-
<pclass="contributors">Made with a great help of Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider,
0 commit comments