djlint 1.8.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/index.js +14 -0
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -127,6 +127,16 @@ function run(stdin) {
127
127
  describe: 'Use .gitignore file to extend excludes.',
128
128
  type: 'boolean',
129
129
  demandOption: false,
130
+ })
131
+ .option('format-css', {
132
+ describe: 'Also format contents of <style> tags.',
133
+ type: 'boolean',
134
+ demandOption: false,
135
+ })
136
+ .option('format-js', {
137
+ describe: 'Also format contents of <script> tags.',
138
+ type: 'boolean',
139
+ demandOption: false,
130
140
  }).argv;
131
141
 
132
142
  // Set flags
@@ -142,6 +152,8 @@ function run(stdin) {
142
152
  const use_gitignore = options['use-gitignore']
143
153
  ? '--use-gitignore'
144
154
  : undefined;
155
+ const format_css = options['format-css'] ? '--format-css' : undefined;
156
+ const format_js = options['format-js'] ? '--format-js' : undefined;
145
157
  const has_stdin = stdin === '' ? options._[0] : '-';
146
158
 
147
159
  // Set variables
@@ -164,6 +176,8 @@ function run(stdin) {
164
176
  indent,
165
177
  profile,
166
178
  ignore,
179
+ format_css,
180
+ format_js,
167
181
  ].filter((x) => {
168
182
  return x !== undefined;
169
183
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djlint",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "description": "HTML Template Linter and Formatter",
5
5
  "main": "./bin/index.js",
6
6
  "directories": {