@jmlweb/postcss-config 0.0.0

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.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # @jmlweb/postcss-config
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@jmlweb/postcss-config)](https://www.npmjs.com/package/@jmlweb/postcss-config)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0.0-339933.svg)](https://nodejs.org/)
6
+
7
+ > PostCSS configuration for Tailwind CSS projects. Includes Tailwind CSS and Autoprefixer plugins with sensible defaults.
8
+
9
+ ## Features
10
+
11
+ - Tailwind CSS plugin for utility-first CSS
12
+ - Autoprefixer for automatic vendor prefixes
13
+ - Zero configuration needed
14
+ - Works with PostCSS 8+
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install --save-dev @jmlweb/postcss-config postcss tailwindcss autoprefixer
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ### Option 1: Using `postcss.config.js` (Recommended)
25
+
26
+ Create a `postcss.config.js` file in your project root:
27
+
28
+ ```javascript
29
+ export { default } from '@jmlweb/postcss-config';
30
+ ```
31
+
32
+ Or for CommonJS:
33
+
34
+ ```javascript
35
+ module.exports = require('@jmlweb/postcss-config').default;
36
+ ```
37
+
38
+ ### Option 2: Direct Import
39
+
40
+ ```javascript
41
+ // postcss.config.js
42
+ import config from '@jmlweb/postcss-config';
43
+
44
+ export default config;
45
+ ```
46
+
47
+ ## Configuration
48
+
49
+ This package provides a PostCSS configuration with the following plugins:
50
+
51
+ | Plugin | Description |
52
+ | -------------- | --------------------------------- |
53
+ | `tailwindcss` | Utility-first CSS framework |
54
+ | `autoprefixer` | Adds vendor prefixes to CSS rules |
55
+
56
+ ## Extending the Configuration
57
+
58
+ You can extend this config for project-specific needs:
59
+
60
+ ```javascript
61
+ // postcss.config.js
62
+ import config from '@jmlweb/postcss-config';
63
+
64
+ export default {
65
+ ...config,
66
+ plugins: {
67
+ ...config.plugins,
68
+ // Add additional plugins
69
+ 'postcss-import': {},
70
+ },
71
+ };
72
+ ```
73
+
74
+ ## Requirements
75
+
76
+ - **Node.js** >= 18.0.0
77
+ - **PostCSS** >= 8.0.0
78
+ - **Tailwind CSS** >= 3.0.0
79
+ - **Autoprefixer** >= 10.0.0
80
+
81
+ ## Peer Dependencies
82
+
83
+ This package requires the following peer dependencies:
84
+
85
+ - `postcss` (>= 8.0.0)
86
+ - `tailwindcss` (>= 3.0.0 or >= 4.0.0)
87
+ - `autoprefixer` (>= 10.0.0)
88
+
89
+ ## Examples
90
+
91
+ See real-world usage examples:
92
+
93
+ - [`example-react-typescript-app`](../../apps/example-react-typescript-app) - React TypeScript app with Tailwind CSS
94
+
95
+ ## Related Packages
96
+
97
+ - [`@jmlweb/prettier-config-tailwind`](../prettier-config-tailwind) - Prettier config with Tailwind class sorting
98
+ - [`@jmlweb/eslint-config-react`](../eslint-config-react) - ESLint config for React projects
99
+
100
+ ## License
101
+
102
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ default: () => index_default
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+ var config = {
27
+ plugins: {
28
+ tailwindcss: {},
29
+ autoprefixer: {}
30
+ }
31
+ };
32
+ var index_default = config;
@@ -0,0 +1,5 @@
1
+ import { Config } from 'postcss-load-config';
2
+
3
+ declare const config: Config;
4
+
5
+ export { config as default };
@@ -0,0 +1,5 @@
1
+ import { Config } from 'postcss-load-config';
2
+
3
+ declare const config: Config;
4
+
5
+ export { config as default };
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ // src/index.ts
2
+ var config = {
3
+ plugins: {
4
+ tailwindcss: {},
5
+ autoprefixer: {}
6
+ }
7
+ };
8
+ var index_default = config;
9
+ export {
10
+ index_default as default
11
+ };
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@jmlweb/postcss-config",
3
+ "version": "0.0.0",
4
+ "description": "PostCSS configuration for jmlweb projects with Tailwind CSS and Autoprefixer",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "README.md",
24
+ "CHANGELOG.md"
25
+ ],
26
+ "keywords": [
27
+ "autoprefixer",
28
+ "postcss",
29
+ "postcss-config",
30
+ "tailwind",
31
+ "tailwindcss"
32
+ ],
33
+ "author": "jmlweb",
34
+ "license": "MIT",
35
+ "repository": "jmlweb/tooling.git",
36
+ "bugs": "https://github.com/jmlweb/tooling/issues",
37
+ "homepage": "https://github.com/jmlweb/tooling/tree/main/packages/postcss-config#readme",
38
+ "engines": {
39
+ "node": ">=18.0.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "peerDependencies": {
45
+ "autoprefixer": "^10.0.0",
46
+ "postcss": "^8.0.0",
47
+ "tailwindcss": "^3.0.0 || ^4.0.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^22.9.0",
51
+ "autoprefixer": "^10.4.20",
52
+ "postcss": "^8.4.49",
53
+ "postcss-load-config": "^6.0.1",
54
+ "tailwindcss": "^3.4.15",
55
+ "tsup": "^8.5.1",
56
+ "typescript": "^5.9.3",
57
+ "@jmlweb/tsconfig-internal": "0.0.1"
58
+ },
59
+ "scripts": {
60
+ "build": "tsup",
61
+ "clean": "rm -rf dist"
62
+ }
63
+ }