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
Copy file name to clipboardExpand all lines: plugin-gradle/README.md
+8-4
Original file line number
Diff line number
Diff line change
@@ -348,6 +348,8 @@ spotless {
348
348
}
349
349
```
350
350
351
+
Spotless uses npm to install necessary packages locally. It runs tsfmt using [J2V8](https://github.com/eclipsesource/J2V8) internally after that.
352
+
351
353
<aname="prettier"></a>
352
354
353
355
## Applying [Prettier](https://prettier.io) to javascript | flow | typeScript | css | scss | less | jsx | graphQL | yaml | etc.
@@ -379,10 +381,9 @@ spotless {
379
381
format 'styling', {
380
382
target '**/*.css', '**/*.scss'
381
383
382
-
// or provide both (config options will win over configFile options)
383
384
prettier().configFile('/path-to/.prettierrc.yml')
384
385
385
-
// or provide both (config options will win over configFile options)
386
+
// or provide both (config options take precedence over configFile options)
@@ -411,15 +412,15 @@ Prettier can also be applied from within the [typescript config block](#typescri
411
412
spotless {
412
413
typescript {
413
414
// no parser or filepath needed
414
-
// -> will default to 'typesript' parser when used in the typescript block
415
+
// -> will default to 'typescript' parser when used in the typescript block
415
416
prettier()
416
417
}
417
418
}
418
419
```
419
420
420
421
### Prerequisite: prettier requires a working NodeJS version
421
422
422
-
prettier, like tsfmt, is based on NodeJS, so to use it, a working NodeJS installation (especially npm) is required on the host running spotless.
423
+
Prettier, like tsfmt, is based on NodeJS, so to use it, a working NodeJS installation (especially npm) is required on the host running spotless.
423
424
Spotless will try to auto-discover an npm installation. If that is not working for you, it is possible to directly configure the npm binary to use.
424
425
425
426
```gradle
@@ -429,6 +430,9 @@ spotless {
429
430
}
430
431
}
431
432
```
433
+
434
+
Spotless uses npm to install necessary packages locally. It runs prettier using [J2V8](https://github.com/eclipsesource/J2V8) internally after that.
0 commit comments