Skip to content

Commit 2b5edf8

Browse files
committed
Big release bravo 2.0
1 parent d079a6b commit 2b5edf8

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import { createPostcssConfigBase, createPostcssConfigStylex, applyPostcssPluginS
7979
Explore the predefined templates for various configurations in the [/templates](/templates) directory. These templates provide quick-start setups for different environments.
8080

8181
**[/templates/base.template](/templates/base.template)**<br />
82+
**[/templates/stylex.template](/templates/stylex.template)**<br />
8283

8384
## Getting Started
8485

@@ -102,6 +103,8 @@ Use the `cp` command to copy it into your project as `/postcss.config.js`:
102103

103104
```bash
104105
cp ./node_modules/@premierstacks/postcss-stack/templates/base.template ./postcss.config.js
106+
# or
107+
cp ./node_modules/@premierstacks/postcss-stack/templates/stylex.template ./postcss.config.js
105108
```
106109

107110
**4. CLI**

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
},
3232
"repository": "github:premierstacks/postcss-stack",
3333
"dependencies": {
34-
"@stylexjs/postcss-plugin": "^0.11",
35-
"@stylexjs/stylex": "^0.11",
36-
"postcss": "^8.5",
37-
"postcss-preset-env": "^10.1"
34+
"@stylexjs/postcss-plugin": "^0.12.0",
35+
"@stylexjs/stylex": "^0.12.0",
36+
"postcss": "^8.5.3",
37+
"postcss-preset-env": "^10.1.5"
3838
},
3939
"devDependencies": {
4040
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^2.0",

src/stylex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function createPostcssConfigStylex(options = def) {
2222
}
2323

2424
export function applyPostcssPluginStylex(config, options = def) {
25-
config.plugins = config.plugins || [];
25+
config.plugins = config.plugins ?? [];
2626

2727
config.plugins.unshift(['@stylexjs/postcss-plugin', { ...def, ...options }]);
2828

templates/stylex.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createPostcssConfigStylex } from '@premierstacks/postcss-stack';
2+
3+
export default createPostcssConfigStylex({
4+
include: ['./src/**/*.{tsx,mts,ts,cts,jsx,mjs,js,cjs}'],
5+
});

0 commit comments

Comments
 (0)