Commit graph

12 commits

Author SHA1 Message Date
Christian Rebelsky
b9ffa84303
fix: fix entry point for storybook, add storybook static ouput to gitignore (#67207)
This PR will fix https://github.com/vercel/next.js/issues/67206

- [x] contributing guidelines for examples are followed
- [x] lint runs without errors
2024-06-26 22:25:42 +09:00
zahra shahrouzi
06db6ca62d
Update with-storybook example (#64911)
### What?

Updated the example `with-storybook`, by upgrading storybook to version
8.0.9 (the latest) which required bumping the version of next.js to 14
from 13 in order to make them work together.

### Why?

The motivation for this change is that we now have better the lastest
features of storybook such as chromatic and visual testing. As of
previous updates, it is still treated as its own framework and so users
can specify the `storybook` framework as well as custom build command
`build-storybook` in order to get near zero-config support.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-04-23 08:13:24 -07:00
Augustin Mauroy
c0282712ae
chore(example): update storybook (#60737)
### What?

- update storybook version
- use `SWC` for perf
- pinging dep for security of the example
- update readme to have correct link

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-16 18:02:13 -08:00
Steven
4466ba436b
chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
Ethan Arrowood
d31ced1d26
update storybook example (copy from vercel/vercel) (#50865)
Updates the `with-storybook` example to be the example located in [`vercel/vercel`](https://github.com/vercel/vercel/tree/main/examples/storybook). 

The motivation for this change is that we now have better support for storybook. It is now treated as its own framework and so users can specify the `storybook` framework as well as custom build command `build-storybook` in order to get near zero-config support 🌟 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-06-14 03:18:44 +00:00
Ryan Clements
6b73acfaf5
Docs: use the nextv12 example from the storybook-addon-next repo as the with-storybook example (#33891)
- use the nextv12 example from the storybook-addon-next repo as the with-storybook example found here: 6583c20803/examples/nextv12
- update the readme for the example to include details on what the example includes
- tweak the example from the `storybook-addon-next` repo to work with type checking and linting



Resolves #33889

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

## Context

This was kindly requested by @leerob in [this issue](https://github.com/RyanClementsHax/storybook-addon-next/issues/3) on the `storybook-addon-next` repo.


P.S. thanks to @leerob for making [this video](https://www.youtube.com/watch?v=cuoNzXFLitc&t=1502s). I found it very helpful for getting me up to speed with how to contribute. I hope I did everything right for y'all. Lmk if there was something I could have done better.
2022-02-06 04:27:56 +00:00
Jose Manuel Casani Guerra
f226a376b1
refactor: update example of storybook (#17936)
## Change

- Update package versions
- Replace @storybook/addons, @storybook/addon-actions to @storybook/addon-essentials
- Replace examples of button, the action function is legacy: https://storybook.js.org/docs/react/essentials/actions#advanced--legacy-usage
2020-11-11 23:14:42 +00:00
Rafael Almeida
521cc621d8
Update Storybook examples to v6.0 (#16139)
* Update with-storybook example

* Delete with-storybook-typescript example

* Add TypeScript section to the README

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-15 15:42:17 -05:00
Joe Haddad
18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00
Tim Neutkens
7c80febcf7 Initial plugins implementation (#9139)
* Add initial bit for plugins

* Add checks for needed metadata values

* Add test

* Initial plugins changes

* Add handling for _app middleware

* Add loading of _document middleware and
handling of multiple default export syntaxes

* Fix insert order for middleware member expression

* Remove early return from middleware plugin from testing

* Add tests for current plugin middlewares

* Update test plugin package.json

* Update handling for class default export

* Update to use webpack loader instead of babel
plugin, remove redundant middleware naming, and add field for required env for plugins

* Add middleware to support material-ui use case
and example material-ui plugin

* Update tests and remove tests stuff from google analytics plugin

* Remove old plugin suite

* Add init-server middleware

* Exit hard without stack trace when error in collecting plugins

* Add on-error-client and on-error-server and update
to run init-server with next-start in serverless mode

* Update init-client for google analytics plugin

* Add example Sentry plugin and update with-sentry-simple

* Remove middleware field/folder and use src dir for plugins

* Add post-hydration middleware and update
material-ui plugin

* Put plugins code behind flag

* Update chromedriver

* Revert "Update chromedriver"

This reverts commit 1461e978e677f7da05e29e0415ec614a04bf65f9.

* Update lock file

* Remove un-needed _app for sentry example

* Add auto loading of scoped packages, add plugins
config for manually listing plugins, and update
to only collect plugins once

* Update example plugins

* Expose plugins' config

* Rename plugin lifecycles and add babel-preset-build

* Rename other methods with unstable

* Update log when plugin config overrides auto-detecting
2019-11-01 14:13:13 -05:00
Rafael Almeida
9b0ec37f24 Update storybook example to v5.2 with CSF (#9036)
* Update storybook example to v5.2 with CSF

* Fix linter errors
2019-10-11 11:57:33 +02:00
Gary Meehan
0da53a1444 Add [with-storybook] example (#4588)
The purpose of the PR is to add the simplest possible integration with Storybook. 

It leaves the default Storybook and also adds a custom component to show how it would be used in both the app and Storybook.

Update: 
Tested with latest 👉  6.1.1
2018-06-29 22:24:44 +02:00