@brybrant/postcss-config 0.0.2 → 0.0.4

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.
@@ -1,4 +1,6 @@
1
- //#region packages/postcss/postcss.config.d.ts
1
+ import { ConfigFn } from "postcss-load-config";
2
+
3
+ //#region postcss.config.d.ts
2
4
  /**
3
5
  * ## PostCSS Config Function
4
6
  *
@@ -0,0 +1,33 @@
1
+ import autoprefixer from "autoprefixer";
2
+ import cssnano from "cssnano";
3
+ import { purgeCSSPlugin } from "@fullhuman/postcss-purgecss";
4
+ import stylelint from "stylelint";
5
+ import cssnanoConfig from "@brybrant/cssnano-config";
6
+ import purgeCSSConfig from "@brybrant/purgecss-config";
7
+ import stylelintConfig from "@brybrant/stylelint-config";
8
+ //#region postcss.config.ts
9
+ /**
10
+ * ## PostCSS Config Function
11
+ *
12
+ * ### Syntax:
13
+ * - [SCSS](https://github.com/postcss/postcss-scss#readme)
14
+ *
15
+ * ### Plugins:
16
+ * - Stylelint ([config](https://www.npmjs.com/@brybrant/stylelint-config))
17
+ * - PurgeCSS ([config](https://www.npmjs.com/@brybrant/purgecss-config))
18
+ * - CSSNANO ([config](https://www.npmjs.com/@brybrant/cssnano-config))
19
+ * - [Autoprefixer](https://github.com/postcss/autoprefixer#options)
20
+ */
21
+ const postcssConfigFn = function() {
22
+ return {
23
+ syntax: "postcss-scss",
24
+ plugins: [
25
+ stylelint(stylelintConfig),
26
+ purgeCSSPlugin(purgeCSSConfig),
27
+ cssnano(cssnanoConfig),
28
+ autoprefixer()
29
+ ]
30
+ };
31
+ };
32
+ //#endregion
33
+ export { postcssConfigFn as default };
package/package.json CHANGED
@@ -2,23 +2,22 @@
2
2
  "name": "@brybrant/postcss-config",
3
3
  "author": "brybrant",
4
4
  "license": "GPL-3.0-only",
5
- "version": "0.0.2",
5
+ "version": "0.0.4",
6
6
  "type": "module",
7
- "module": "./postcss.config.js",
8
- "types": "./postcss.config.d.ts",
9
- "exports": "./postcss.config.js",
7
+ "module": "./dist/postcss.config.js",
8
+ "types": "./dist/postcss.config.d.ts",
9
+ "exports": "./dist/postcss.config.js",
10
10
  "files": [
11
- "postcss.config.d.ts",
12
- "postcss.config.js"
11
+ "dist"
13
12
  ],
14
13
  "repository": {
15
14
  "type": "git",
16
15
  "url": "git+https://github.com/brybrant/configs.git"
17
16
  },
18
17
  "dependencies": {
19
- "@brybrant/cssnano-config": "^0.0.2",
20
- "@brybrant/purgecss-config": "^0.0.2",
21
- "@brybrant/stylelint-config": "^0.0.2",
18
+ "@brybrant/cssnano-config": "^0.0.3",
19
+ "@brybrant/purgecss-config": "^0.0.3",
20
+ "@brybrant/stylelint-config": "^0.0.5",
22
21
  "autoprefixer": "^10.4.27",
23
22
  "postcss-load-config": "^6.0.1",
24
23
  "postcss-scss": "^4.0.9"