Comments (15)
@itsjavi thanks, I gonna check it out!
Will it also be compatible with Preact
?
from storylite.
meanwhile please check the examples in some commit previous to separating the plugin
from storylite.
released 0.3.0 together with @storylite/vite-plugin
from storylite.
@itsjavi thanks, now installation and setup took just a minute in a new vite react-ts project.
from storylite.
Hey there, the project is still very experimental, and I still need to figure out how to bundle it properly for npm, but I will give it a try in the next days :)
contributions will be also very helpful
from storylite.
I cloned the repo and checked the dashboard, looks really great so far, can't wait to use it!
Currently I tested multiple bundlers with my react components. I ended up using pkgroll today, since it is very easy to setup, uses rollup and produces clean bundles.
I tested rollup bundlers: rollup
& vite
, and esbuild bundlers: esbuild
, unbuild
, tsup
, ptsup
.
Have a look at my react and react-hooks packages for the setup, I can just recommend.
from storylite.
@jrson83 thank you, in the last hours I've rewritten many parts of the project to be able to publish it (@storylite/storylite
now released as v0.1.1) and integrate with other projects.
Now it's bundled with tsup
, and it's more a drop-in plugin for Vite + a React app on top.
You can check how to integrate it in this React example setup https://github.com/itsjavi/storylite/tree/main/packages/examples/react
I am going to start using it actively in one of my projects soon, so I hope to make it more stable.
from storylite.
@itsjavi awesome, thanks! I gonna try replace ladle with storylite in my monorepo.
from storylite.
@jrson83 v0.1.x was not working properly,
I released v0.2.0 which now resolves stories and virtual modules properly,
more info: https://github.com/itsjavi/storylite/blob/main/packages/storylite/CHANGELOG.md#breaking-changes
Now the UI can work with other frameworks, not only Vite
from storylite.
@itsjavi I read the changelog and tried to use it in my monorepo. I checked the react example, but I can't make use of it in the current state, because it is using @storylite/vite-plugin
as devDependencies
and import storylitePlugin from '@storylite/vite-plugin'
in the vite.config,ts. So the example works inside your monorepo, but not for me, since you did not release @storylite/vite-plugin
.
I see on my installed @storylite/storylite
dist folder, it is somehow merged with the vite-plugin, so includes plugins.d.ts
and virtual-modules.d.ts
. To get the correct storylitePlugin
I used the following settings as workaround, since index.d.ts
does not export storylitePlugin
.
// vite.config.ts
import { storylitePlugin } from '@storylite/storylite/dist/plugins'
Using types with @storylite/storylite/dist/virtual-modules.d.ts
breaks my tsconfig cause:
Cannot find type definition file for '@storylite/storylite/dist/virtual-modules.d.ts'.
As workaround I used this config to get the named storylitePlugin
import working:
// tsconfig.json
{
"types": ["node", "react", "react-dom", "@storylite/storylite"]
}
But when I try import stories from 'virtual:storylite-stories'
in storylite.tsx
I get:
Cannot find module 'virtual:storylite-stories' or its corresponding type declarations.ts(2307)
Could you update the react example to work without @storylite/vite-plugin
or what am I doing wrong?
from storylite.
Thanks for your infos, what's on main is not stable, I plan to separate the vite plugin but is not yet released (I will have time this weekend)
from storylite.
Thanks for your infos, what's on main is not stable, I plan to separate the vite plugin but is not yet released (I will have time this weekend)
Oh okay, I did not realize there was another branch.
from storylite.
released 0.3.0 together with
@storylite/vite-plugin
Thanks, I will try again.
from storylite.
@itsjavi I'm having problems migrating my ladle stories.
I like to have a Sidebar Category Components
, which holds all components from src folder.
Can you take a look here?
https://github.com/jrson83/shrtcss/blob/main/packages/react/src/divider/divider.stories.tsx
from storylite.
@jrson83 if you only export one component, it is not grouped.
maybe that's a not an obvious behaviour. it would be ok for me to change it.
That's here:
from storylite.
Related Issues (20)
- Cannot find module 'virtual:storylite-stories' or its corresponding type declarations
- [refactor] use only the necessary lucide icons and reduce package size
- [feat]: add MD support to prepend documentation HOT 1
- refactor: replace @r1stack/core with classix HOT 1
- [bug] history.back() is inconsistent
- [feat]: add global story options (decorators, etc)
- [bug]: localStorageKey option has no effect HOT 3
- [bug] Typescript support for components using `forwardRef` HOT 1
- [bug] the iframe bottom gets trimmed when is larger than 100vh HOT 2
- [bug] repaint & srolling performance issues
- [bug] sidebar not visible when canvas fills the height HOT 1
- [feat] add a props/args panel, similar to SB's Controls
- [docs] Provide more useful initial documentation
- [bug] sidebar menu items line-height too small in firefox
- [bug] vscode `jestCommandLine` windows path incompatibility
- [bug] non-optional component properties not satisfied by `SLFunctionComponent<{}>` HOT 2
- [bug] exporting `Default` from a story with atleast one more export breaks sidebar `active` items
- [bug] `args` defined in exports are not inherited by other stories without defining `decorators`
- [feat] replace eslint & prettier with biome HOT 2
- [bug] cannot import ts/tsx files in mdx
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storylite.