Skip to content

Commit

Permalink
docs: fix postcss require example
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Mar 2, 2023
1 parent e8187b3 commit 6c20969
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-turtles-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wayofdev/postcss-config': patch
---

docs: invalid require of postcss config
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Commitlint is a tool that ensures that your commit messages meet certain standar
1. Create an empty `commitlint.config.js` file:
```bash
$ touch commitlint.config.js
touch commitlint.config.js
```
2. Paste the following code into the file:
Expand All @@ -288,7 +288,7 @@ Lint-Staged is a tool that allows you to run linters on only the files that have
1. In the root directory of your project, create the file `lint-staged.config.js`:
```bash
$ touch lint-staged.config.js
touch lint-staged.config.js
```
2. Add the following contents to `lint-staged.config.js`:
Expand Down Expand Up @@ -324,29 +324,29 @@ Husky is a tool that allows you to set up Git hooks, which are scripts that run
1. Add pnpm scripts to your `package.json` file:
```bash
$ pnpm pkg set scripts.prepare="is-ci || husky install"
pnpm pkg set scripts.prepare="is-ci || husky install"
```
This will add a `prepare` script that will run the `husky install` command when you run `pnpm install`.
2. Run the `prepare` command once to configure Husky:
```bash
$ pnpm run prepare
pnpm run prepare
```
3. Add a pre-commit hook that runs `lint-staged`:
```bash
$ pnpm husky add .husky/pre-commit "pnpm lint-staged --verbose --concurrent false"
pnpm husky add .husky/pre-commit "pnpm lint-staged --verbose --concurrent false"
```
This will run `lint-staged` on the files that have been staged in Git before you make a commit.
4. Add a commit-msg hook that runs `commitlint`:
```bash
$ pnpm husky add .husky/commit-msg 'pnpm commitlint --edit "${1}"'
pnpm husky add .husky/commit-msg 'pnpm commitlint --edit "${1}"'
```
This will run `commitlint` on the commit message that you write before you make a commit.
Expand All @@ -360,7 +360,7 @@ By following these steps, you can ensure that your commits meet certain standard
You can check `Makefile` or `package.json` to get full list of commands for local testing. For testing, you can use these commands to test:
```bash
$ make test
make test
```
<br>
Expand Down
2 changes: 1 addition & 1 deletion packages/browserslist-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ To use `@wayofdev/browserslist-config` in your JavaScript projects within a mono
Adding the following script to your root `package.json` file makes it easier to run the `browserslist` command in your mono-repository:

```bash
$ pnpm pkg set scripts.lint:browsers="browserslist"
pnpm pkg set scripts.lint:browsers="browserslist"
```

For `npm` users, replace `pnpm` with `npm` in the above command.
Expand Down
4 changes: 2 additions & 2 deletions packages/postcss-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ To extend the `@wayofdev/postcss-config` configuration, create a new `postcss.co
```js
module.exports = {
plugins: [
require('@wayofdev/postcss-config').plugins,
...require('@wayofdev/postcss-config').plugins,
require('autoprefixer')
]
}
```

In this code, you're extending the `plugins` array of the existing configuration by first including the plugins in the original configuration using `require('@wayofdev/postcss-config').plugins` and then adding `autoprefixer` as a new plugin.
In this code, you're extending the `plugins` array of the existing configuration by first including the plugins in the original configuration using `...require('@wayofdev/postcss-config').plugins` and then adding `autoprefixer` as a new plugin.

<br>

Expand Down

0 comments on commit 6c20969

Please sign in to comment.