@salty-css/react 0.0.1-alpha.31 → 0.0.1-alpha.33

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 +49 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,15 +1,56 @@
1
- # Salty Css
1
+ # Salty CSS - Kinda sweet but yet spicy CSS-in-JS library 🧂
2
2
 
3
- ## Basic usage example with Button
3
+ In the world of frontend dev is there anything saltier than CSS? Salty CSS is built to provide better developer experience for developers looking for performant and feature rich CSS-in-JS solutions.
4
4
 
5
- ### Initial requirements
5
+ ## Features
6
6
 
7
- 1. Add `saltyPlugin` to vite or webpack config from `@salty-css/vite` or `@salty-css/webpack`
8
- 2. Create `salty.config.ts` to the root of your project
9
- 3. Import global styles to any regular .css file from `saltygen/index.css` (does not exist during first run, cli command coming later)
10
- 4. Create salty components with styled only inside files that end with `.css.ts`, `.salty.ts` `.styled.ts` or `.styles.ts`
7
+ - Build time compilation to achieve awesome runtime performance and minimal size
8
+ - Next.js, React Server Components, Vite and Webpack support
9
+ - Type safety with out of the box TypeScript and ESLint plugin
10
+ - Advanced CSS variables configuration to allow smooth token usage
11
+ - Style templates to create reusable styles easily
11
12
 
12
- ### Code examples
13
+ ## Get started
14
+
15
+ ### Quick way of using `salty-css` CLI
16
+
17
+ #### Initialize Salty CSS for a project
18
+
19
+ In your 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.
20
+
21
+ #### Create components
22
+
23
+ Components can be created with `npx salty-css generate [filePath]` which then creates a new Salty CSS component file to the specified path. Additional options like `--dir, --tag, --name and --className` are also supported. Read more about them with `npx salty-css generate --help`
24
+
25
+ #### Build / Compile Salty CSS
26
+
27
+ If you want to manually build your project that can be done by running `npx salty-css build [directory]`
28
+
29
+ #### Update Salty CSS packages
30
+
31
+ To ease the pain of package updates all Salty CSS packages can be updated with `npx salty-css update`
32
+
33
+ ### Manual work
34
+
35
+ #### React
36
+
37
+ 1. Install related dependencies: `npm i @salty-css/core @salty-css/react`
38
+ 2. Create `salty.config.ts` to your app directory
39
+
40
+ #### Vite
41
+
42
+ 1. First check the instructions for React
43
+ 2. For Vite support install `npm i -D @salty-css/vite`
44
+ 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
45
+ 4. Make sure that `salty.config.ts` and `vite.config.ts` are in the same folder!
46
+
47
+ ### Create components
48
+
49
+ 1. Create salty components with styled only inside files that end with `.css.ts`, `.salty.ts` `.styled.ts` or `.styles.ts`
50
+
51
+ ## Code examples
52
+
53
+ ### Basic usage example with Button
13
54
 
14
55
  **Salty config**
15
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.31",
3
+ "version": "0.0.1-alpha.33",
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.31",
44
+ "@salty-css/core": "^0.0.1-alpha.33",
45
45
  "clsx": ">=2.x",
46
46
  "react": ">=19.x || >=18.3.x"
47
47
  }