@salty-css/react 0.0.1-alpha.51 → 0.0.1-alpha.52

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.
Files changed (2) hide show
  1. package/README.md +13 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -22,7 +22,7 @@ In the world of frontend dev is there anything saltier than CSS? Salty CSS is bu
22
22
 
23
23
  #### Initialize Salty CSS for a project
24
24
 
25
- In your existing repository run `npx salty-css init [directory]` which installs required salty-css packages to the current directory and creates project files to the provided directory. Directory can be left blank if you want files to be created to the current directory. Init will also create `.saltyrc` which contains some metadata for future CLI commands.
25
+ In your existing repository run `npx salty-css init [directory]` which installs required salty-css packages to the current directory, detects framework in use (current support for vite and next.js) and creates project files to the provided directory. Directory can be left blank if you want files to be created to the current directory. Init will also create `.saltyrc` which contains some metadata for future CLI commands.
26
26
 
27
27
  #### Create components
28
28
 
@@ -43,11 +43,22 @@ To ease the pain of package updates all Salty CSS packages can be updated with `
43
43
  1. Install related dependencies: `npm i @salty-css/core @salty-css/react`
44
44
  2. Create `salty.config.ts` to your app directory
45
45
 
46
+ #### Next.js
47
+
48
+ 1. First check the instructions for React
49
+ 2. For Next.js support install `npm i -D @salty-css/next`
50
+ 3. Add Salty CSS plugin to next.js config
51
+
52
+ - **Next.js 15:** In `next.config.ts` add import for salty plugin `import { withSaltyCss } from '@salty-css/next';` and then add `withSaltyCss` to wrap your nextConfig export like so `export default withSaltyCss(nextConfig);`
53
+ - **Next.js 14 and older:** In `next.config.js` add import for salty plugin `const { withSaltyCss } = require('@salty-css/next');` and then add `withSaltyCss` to wrap your nextConfig export like so `module.exports = withSaltyCss(nextConfig);`
54
+
55
+ 4. Make sure that `salty.config.ts` and `next.config.ts` are in the same folder!
56
+
46
57
  #### Vite
47
58
 
48
59
  1. First check the instructions for React
49
60
  2. For Vite support install `npm i -D @salty-css/vite`
50
- 3. In `vite.config.ts` add import for salty plugin `import { saltyPlugin } from '@salty-css/vite';` and then add `saltyPlugin(__dirname)` to your vite configuration plugins
61
+ 3. In `vite.config` add import for salty plugin `import { saltyPlugin } from '@salty-css/vite';` and then add `saltyPlugin(__dirname)` to your vite configuration plugins
51
62
  4. Make sure that `salty.config.ts` and `vite.config.ts` are in the same folder!
52
63
 
53
64
  ### Create components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.51",
3
+ "version": "0.0.1-alpha.52",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@salty-css/core": "^0.0.1-alpha.51",
44
+ "@salty-css/core": "^0.0.1-alpha.52",
45
45
  "clsx": ">=2.x",
46
46
  "react": ">=19.x || >=18.3.x"
47
47
  }