mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
prep for using js-beautify
This commit is contained in:
parent
68e35d2b0d
commit
b9410572ea
11
.jsbeautifyrc
Normal file
11
.jsbeautifyrc
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
|
||||
"end_with_newline": true,
|
||||
"indent_size": 2,
|
||||
"indent_char": " ",
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": false,
|
||||
"preserve_newlines": true,
|
||||
"max_preserve_newlines": 2,
|
||||
"jslint_happy": true
|
||||
}
|
6
.jsbeautifyrc-css
Normal file
6
.jsbeautifyrc-css
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"allowed_file_extensions": ["css", "scss", "sass", "less"],
|
||||
"indent_size": 2,
|
||||
"selector_separator_newline": true,
|
||||
"newline_between_rules": true
|
||||
}
|
6
.jsbeautifyrc-html
Normal file
6
.jsbeautifyrc-html
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"allowed_file_extensions": ["htm", "html"],
|
||||
"indent_size": 4,
|
||||
"preserve_newlines": true,
|
||||
"max_preserve_newlines": 1
|
||||
}
|
6
utils/beautify.sh
Executable file
6
utils/beautify.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
find src -type f -not -path "*tests*" -name '*.js' | xargs -n1 js-beautify --config .jsbeautifyrc -r
|
||||
find src -type f -not -path "*tests*" -name '*.css' | xargs -n1 css-beautify --config .jsbeautifyrc-css -r
|
||||
find src -type f -not -path "*tests*" -name '*.scss' | xargs -n1 css-beautify --config .jsbeautifyrc-css -r
|
||||
find src -type f -not -path "*tests*" -name '*.html' | xargs -n1 html-beautify --config .jsbeautifyrc-html -r
|
||||
html-beautify --config .jsbeautifyrc-html -r example.html
|
Loading…
Reference in New Issue
Block a user