Commit Graph

7 Commits (c45b78a4daf526ef528239a9bda38133e869cbe7)

Author SHA1 Message Date
Thomas Bouffard fe7f1a8123
chore: migrate to storybook v7 (#230)
- Migrate the existing stories to work with storybook v7.
- Use the `vite` builder. The startup time decrease from 40 seconds
(best time with v6) to 1 second (worst time with v7)
- Webpack is no more used, `vite` now manages everything
- Add support for writing stories in TypeScript. It also detect existing
import errors in the existing stories written in JS
- Migrate the Toolbar story to TypeScript to demonstrate it works. As
part of the migration, fix how CellStyle is set in the story (easily
detected thanks to types checking)
- Detect wrong imports in stories and fix them
- The storybook mini-site can be built (previously the build always
failed and storybook could only be used in development mode)
- Add support for Node 18

Other changes
- core: simplify the "dev" script:
- There is no need to invoke webpack as the UMD bundle is no longer used
by stories.
- Instead, call `tsc` watch which is faster, so code changes are visible
faster in stories
- "Build" GitHub workflow:
- Build storybook mini-site and attach all examples as artifact to help
reviewing Pull Requests
- Lint at the end, this is more important to check the build and
examples first
2023-10-12 23:41:37 +02:00
Thomas Bouffard a2a718b40f
feat(examples): activate the storybook source addon (#75)
This replicates what mxgraph examples previously provided: the source code directly accessible within the example.
It allows copy/paste for reuse in user applications and should improve the adoption.
The code used to manage the controls is easily identifiable and can help highlight certain parts of the example (ContextMenu, RubberBand, ...).

Also bump storybook from 6.4.0 to 6.4.13.
2022-01-25 07:19:17 +01:00
Thomas Bouffard 14f5815149 chore(storybook): fix server start and warnings
Remove the extra NODE_OPTIONS in storybook server start script that generated an
error.
Remove cross-env devDependency which is then not used anymore.
Fix storybook deprecation warning (static dirs)
2022-01-19 21:13:05 +01:00
Junsik Shim a7429b2a54 Trying to run HelloWorld... 2021-09-09 10:14:59 +09:00
Junsik Shim 59e39cb312 - Convert more examples. 2021-04-24 21:32:54 +09:00
Junsik Shim 8c3afdfc77 - Add images for the examples.
- Convert more examples to storybook.
2021-04-24 21:32:54 +09:00
Junsik Shim 1b0f3d6b9e - Restructure into a monorepo.
- Add Storybook to packages.
- Remove circular dependencies.
2021-04-15 13:12:12 +09:00