mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
move to devTools
This commit is contained in:
parent
438259ac24
commit
bebb5c7951
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -125,7 +125,7 @@
|
||||
"html.format.indentHandlebars": true,
|
||||
"html.format.preserveNewLines": true,
|
||||
"html.format.maxPreserveNewLines": 2,
|
||||
"stylelint.configFile": ".stylelintrc.json",
|
||||
"stylelint.configFile": "devTools/.stylelintrc.json",
|
||||
"java.project.sourcePaths": [
|
||||
"stirling-pdf/src/main/java",
|
||||
"common/src/main/java",
|
||||
|
@ -6,6 +6,8 @@ Apply Stylelint to your project's CSS with the following steps:
|
||||
|
||||
1. **NPM Script**
|
||||
|
||||
- Go to directory: `devTools/`
|
||||
|
||||
- Add Stylelint & stylistic/stylelint-plugin
|
||||
```bash
|
||||
npm install --save-dev stylelint stylelint-config-standard
|
||||
@ -15,28 +17,30 @@ Apply Stylelint to your project's CSS with the following steps:
|
||||
```jsonc
|
||||
{
|
||||
"scripts": {
|
||||
"lint:css": "stylelint \"stirling-pdf/src/main/**/*.css\" \"proprietary/src/main/resources/static/css/*.css\" --fix"
|
||||
"lint:css:check": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json",
|
||||
"lint:css:fix": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix"
|
||||
}
|
||||
}
|
||||
```
|
||||
- Run the linter:
|
||||
```bash
|
||||
npm run lint:css
|
||||
npm run lint:css:check
|
||||
npm run lint:css:fix
|
||||
```
|
||||
|
||||
2. **CLI Usage**
|
||||
|
||||
- Lint all CSS files:
|
||||
```bash
|
||||
npx stylelint "stylelint \"stirling-pdf/src/main/**/*.css\" \"proprietary/src/main/resources/static/css/*.css\""
|
||||
npx stylelint ../stirling-pdf/src/main/**/*.css ../proprietary/src/main/resources/static/css/*.css
|
||||
```
|
||||
- Lint a single file:
|
||||
```bash
|
||||
npx stylelint path/to/file.css
|
||||
npx stylelint ../proprietary/src/main/resources/static/css/audit-dashboard.css
|
||||
```
|
||||
- Apply automatic fixes:
|
||||
```bash
|
||||
npx stylelint "stirling-pdf/src/main/**/*.css" "proprietary/src/main/resources/static/css/*.css" --fix
|
||||
npx stylelint "../stirling-pdf/src/main/**/*.css" "../proprietary/src/main/resources/static/css/*.css" --fix
|
||||
```
|
||||
|
||||
For full configuration options and rule customization, refer to the official documentation: [https://stylelint.io](https://stylelint.io)
|
||||
|
13
devTools/package.json
Normal file
13
devTools/package.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "stirling-pdf",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"lint:css:check": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json",
|
||||
"lint:css:fix": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stylistic/stylelint-plugin": "^3.1.3",
|
||||
"stylelint": "^16.21.1",
|
||||
"stylelint-config-standard": "^38.0.0"
|
||||
}
|
||||
}
|
12
package.json
12
package.json
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "stirling-pdf",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"lint:css": "stylelint \"stirling-pdf/src/main/**/*.css\" \"proprietary/src/main/resources/static/css/*.css\" --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stylistic/stylelint-plugin": "^3.1.3",
|
||||
"stylelint": "^16.21.1",
|
||||
"stylelint-config-standard": "^38.0.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user