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
{{ message }}
This repository was archived by the owner on Mar 30, 2023. It is now read-only.
* Adds Stylelint
- New npm script, css-lint
- Pulls in Bootstrap's config
- Replaces named color with BS variable
- Updates readme with new script, also adds links to other tools
* Add css-lint script in `npm test`
* Mention Stylelint in the readme, add test to script table
* Mention npm test there too
* Explain stylelintignore and stylelintrc files
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,16 +55,18 @@ Open <http://localhost:3000> to see the page in action.
55
55
56
56
## Scripts
57
57
58
-
The following npm scripts are available to you in this starter repo. With the exception of `npm start`, the remaining scripts can be run from your command line with `npm run scriptName`.
58
+
The following npm scripts are available to you in this starter repo. With the exception of `npm start` and `npm test`, the remaining scripts can be run from your command line with `npm run scriptName`.
59
59
60
60
| Script | Description |
61
61
| --- | --- |
62
62
|`server`| Starts a local server (<http://localhost:3000>) for development |
63
63
|`watch`| Automatically recompiles CSS as it watches the `scss` directory for changes |
64
64
|`css`| Runs `css-compile` and `css-prefix`|
65
65
|`css-compile`| Compiles source Sass into CSS |
66
-
|`css-prefix`| Runs Autoprefixer on the compiled CSS |
67
-
|`css-purge`| Runs PurgeCSS to remove CSS that is unused by `index.html`|
66
+
|`css-lint`| Runs [Stylelint](https://stylelint.io) against source Sass for code quality |
67
+
|`css-prefix`| Runs [Autoprefixer](https://github.com/postcss/autoprefixer) on the compiled CSS |
68
+
|`css-purge`| Runs [PurgeCSS](https://purgecss.com) to remove CSS that is unused by `index.html`|
69
+
|`test`| Runs `css-lint` and `css`, in sequential order |
68
70
69
71
## Advanced usage
70
72
@@ -110,6 +112,12 @@ When your repository is generated, you won't see anything in the Actions tab unt
110
112
111
113
[Learn more about GitHub Actions](https://github.com/features/actions), [read the Actions docs](https://help.github.com/en/actions), or [browse the Actions Marketplace](https://github.com/marketplace/actions).
112
114
115
+
### Stylelint
116
+
117
+
Stylelint is included, as is Bootstrap's default Stylelint config, [stylelint-config-twbs-bootstrap](https://github.com/twbs/stylelint-config-twbs-bootstrap). This is the same linter configuration we use in the main Bootstrap project. It's run via the `npm test` command, which is invoked in our `ci.yml` Actions workflow file.
118
+
119
+
At the root of the repo, `.stylelintignore` is used to list files that we ignore when linting and `.stylelintrc` is where we tell Stylelint to use the Bootstrap config. The former is recommended based on your specific needs, while the latter is required.
0 commit comments