Skip to content

Commit 2a11c72

Browse files
authored
Merge pull request #100 from anonymousRecords/doc/update-readme
Update README: Clarify package versions and simplify development process
2 parents ce37cfb + fb75f99 commit 2a11c72

File tree

1 file changed

+55
-13
lines changed

1 file changed

+55
-13
lines changed

README.md

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -163,29 +163,71 @@ function App() {
163163

164164
## More Package Details
165165

166-
### [npm]
166+
### Package Versions
167+
- **without-store.mjs (v2)**:
168+
- Current version
169+
- Stateless React components
170+
- More flexible and easier to integrate into various state management systems
171+
- Will continue to be developed and improved
172+
- **with-store.mjs (v1)**:
173+
- Legacy version
174+
- Includes built-in state management (using Zustand)
175+
- Useful for quick setup but less flexible
176+
- Will be maintained but not actively developed
167177

168-
1. For general React environments (with separated store code):
169-
`'shadergradient' → '/dist/without-store.mjs'`
178+
### npm Usage
170179

171-
2. For React (Storized Control UI\*):
172-
`'shadergradient/with-store' → '/dist/with-store.mjs'`
180+
1. For general React environments (current version, stateless):
173181

174-
e.g) [shadergradient-web.vercel.app/customize](https://shadergradient-web.vercel.app/customize) (Next.js)
182+
```
183+
import { ShaderGradient } from 'shadergradient'
184+
```
175185

176-
### [esm]
186+
This imports from `/dist/without-store.mjs`
177187

178-
1. For ESM-supported React applications: https://esm-shadergradient.onrender.com/without-store.mjs
188+
2. For React with legacy Storized Control UI:
179189

180-
For use in the Framer canvas (Storized Control UI\*) : https://esm-shadergradient.onrender.com/with-store.mjs
190+
```
191+
import { ShaderGradient } from 'shadergradient/with-store'
192+
```
181193

182-
e.g) [shadergradient.co/customize](https://www.shadergradient.co/customize) (Framer Sites)
194+
This imports from `/dist/with-store.mjs`
183195

184-
2. For use in Figma plugins (mixed with DB code / Use the same store of the StoreGradient): https://esm-shadergradient.onrender.com/with-store.mjs
196+
Example: [shadergradient-web.vercel.app/customize](https://shadergradient-web.vercel.app/customize) (Next.js)
185197

186-
(All ESM modules are dynamically served based on client ips. We call it as "ESM Editor" and used it for dev purposes.)
198+
### ESM Usage
187199

188-
\* Storized Control UI: `with-store.mjs` includes store codes (zustand) that is also used on the control UIs. So can sync states of gradient & controls without adding any codes.
200+
1. For ESM-supported React applications (current version, stateless):
201+
`https://esm-shadergradient.onrender.com/without-store.mjs`
202+
2. For use in the Framer canvas (legacy Storized Control UI):
203+
`https://esm-shadergradient.onrender.com/with-store.mjs`
204+
Example: [shadergradient.co/customize](https://www.shadergradient.co/customize) (Framer Sites)
205+
3. For use in Figma plugins:
206+
`https://esm-shadergradient.onrender.com/with-store.mjs`
207+
This version is mixed with DB code and uses the same store as StoreGradient.
208+
209+
Note: All ESM modules are dynamically served based on client IPs. We refer to this system as "ESM Editor" and use it for development purposes.
210+
211+
### Source Code Structure and Version Management
212+
213+
```
214+
shadergradient/
215+
├─ src/
216+
│ ├─ (current version code)
217+
├─ src-dev/
218+
├─ (previously used for staging new features)
219+
220+
```
221+
222+
The `src` and `src-dev` folders exist only within the shadergradient package directory. Previously, `src-dev` was used as a staging area for new versions due to version management limitations in Framer.
223+
224+
However, we are phasing out this approach:
225+
226+
1. The `src-dev` folder is no longer actively used for development.
227+
2. We will no longer maintain separate `src` and `src-dev` directories for version management.
228+
3. Future version management and development will be handled directly within the Framer project.
229+
230+
This change will simplify our development process and align it more closely with standard practices. All new features and updates will be developed and tested within the Framer project environment, ensuring better integration and easier maintenance.
189231

190232
# Examples
191233

0 commit comments

Comments
 (0)