-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'otherproj/prepare-merge' into merge
- Loading branch information
Showing
70 changed files
with
2,648 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
git-checks=false | ||
publish-branch=main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"incremental": false, | ||
"noImplicitAny": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"jsx": "react", | ||
"moduleResolution": "Node", | ||
"target": "ES2020", | ||
"module": "CommonJS", | ||
"skipLibCheck": false, | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"isolatedModules": true, | ||
"strictBindCallApply": true, | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"noUnusedLocals": true, | ||
|
||
"strict": true | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"**/dist", | ||
"node_modules", | ||
"**/node_modules" | ||
], | ||
"ts-node": { | ||
"transpileOnly": true, | ||
"files": true, | ||
"compilerOptions": { | ||
"types": [ | ||
"node" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Changelog | ||
|
||
|
||
## v0.2.6 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.2.6-alpha.0...v0.2.6) | ||
|
||
## v0.2.1 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.2.1-alpha.1...v0.2.1) | ||
|
||
## v0.2.0 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.2.1-alpha.0...v0.2.0) | ||
|
||
## v0.2.0 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.2.0-alpha.4...v0.2.0) | ||
|
||
## v0.1.9 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.1.9-alpha.0...v0.1.9) | ||
|
||
## v0.1.8 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.1.8-alpha.0...v0.1.8) | ||
|
||
### 📦 Build | ||
|
||
- Storybook-static,still have nuxt inst issue ([ac15e16](https://github.com/storybook-vue/storybook-nuxt/commit/ac15e16)) | ||
|
||
### ❤️ Contributors | ||
|
||
- ChakAs3 ([@chakAs3](http://github.com/chakAs3)) | ||
|
||
## v0.1.7 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.1.7-alpha.0...v0.1.7) | ||
|
||
## v0.1.4 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.1.3...v0.1.4) | ||
|
||
## v0.1.3 | ||
|
||
[compare changes](https://github.com/storybook-vue/storybook-nuxt/compare/v0.1.3-alpha.0...v0.1.3) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Storybook for Nuxt framework <!-- omit in toc --> | ||
|
||
|
||
![sb-nuxt (2)](https://github.com/storybook-vue/nuxt/assets/711292/6cd06c77-1b6e-4a45-9666-a97d091a27c0) | ||
|
||
|
||
Storybook package for [**Nuxt framework**](https://nuxt.com/) with zero configs. seamless integration supporting all Nuxt fancy features | ||
|
||
|
||
|
||
https://github.com/storybook-vue/nuxt/assets/711292/e66a1899-ab7c-42dd-b358-59e22ff0f609 | ||
|
||
|
||
|
||
## Supported Features | ||
|
||
👉 [Nuxt Modules](#nuxts-image-component) | ||
|
||
👉 [Nuxt Plugins](#nuxt-font-optimization) | ||
|
||
👉 [All in-built Nuxt Components](#nuxt-components) | ||
|
||
👉 [Sass/Scss](#sassscss) | ||
|
||
👉 [Css/Sass/Scss Modules](#csssassscss-modules) | ||
|
||
👉 [ JSX ](#styled-jsx) | ||
|
||
👉 [Postcss](#postcss) | ||
|
||
👉 [Auto Imports](#auto-imports) | ||
|
||
👉 [Runtime Config](#runtime-config) | ||
|
||
👉 [Composables](#composables) | ||
|
||
👉 [Typescript](#typescript) (already supported out of the box by Storybook) | ||
|
||
👉 [Nuxt DevTools](https://devtools.nuxtjs.org/) : finally as Bonus, Nuxt DevTools works amazingly with your Storybook, full features | ||
|
||
|
||
https://github.com/storybook-vue/nuxt/assets/711292/63cc1fb3-ec6b-4df2-ad61-d87e5692f385 | ||
|
||
|
||
|
||
## Requirements | ||
|
||
- [Nuxt](https://nuxt.com/) >= 3.x | ||
- [Storybook](https://storybook.js.org/) >= 7.x | ||
|
||
## Demo | ||
|
||
Checkout the demo repo [storybook7-nuxt3-demo](https://github.com/storybook-vue/storybook-nuxt-demo) | ||
or try it on [Stackblitz](https://stackblitz.com/~/github.com/storybook-vue/storybook-nuxt-demo) | ||
|
||
## Getting Started | ||
|
||
### In a project without Storybook | ||
|
||
Follow the prompts after running this command in your Nuxt project's root directory: | ||
|
||
```bash | ||
npx storybook-nuxt init | ||
``` | ||
|
||
[More on getting started with Storybook](https://storybook.js.org/docs/vue3/get-started/install) | ||
|
||
#### Automatic migration | ||
|
||
When running the `upgrade` command above, you should get a prompt asking you to migrate to `@storybook-vue/nuxt`, which should handle everything for you. In case auto-migration does not work for your project, refer to the manual migration below. | ||
|
||
|
||
|
||
Update your `main.js` to change the framework property: | ||
|
||
```js | ||
// .storybook/main.js | ||
export default { | ||
// ... | ||
framework: { | ||
name: '@storybook-vue/nuxt', // Add this | ||
options: {}, | ||
}, | ||
} | ||
``` | ||
|
||
## Documentation | ||
|
||
In progress | ||
|
||
## License | ||
|
||
This repository is licensed under the [MIT License](LICENSE). Feel free to use the code and modify it according to your needs. | ||
|
||
## Contacts : | ||
|
||
🔖 Mail: javachakir@gmail.com | ||
|
||
💬 Discord: ChakAs3 | ||
|
||
🐦⬛ Twitter: [@ChakirQatab](https://twitter.com/ChakirQatab) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
|
||
export default defineBuildConfig({ | ||
declaration: true, | ||
entries: [ | ||
{ input: 'src/index' }, | ||
{ input: 'src/preview' }, | ||
{ input: 'src/preset', outDir: 'dist/', format: 'cjs', ext: 'js' }, | ||
{ | ||
input: 'src/runtime/', outDir: 'dist/runtime', format: 'esm', ext: 'js', | ||
}, | ||
|
||
], | ||
|
||
rollup: { | ||
emitCJS: true, | ||
inlineDependencies: true, | ||
}, | ||
dependencies: [ | ||
'vue-router', | ||
'@storybook/vue3', | ||
'@storybook/builder-vite', | ||
'@storybook/vue3-vite', | ||
], | ||
externals: [ | ||
'nuxt', | ||
'nuxt/schema', | ||
'nuxt/app', | ||
'vue', | ||
'@storybook/types', | ||
'@storybook/vue3', | ||
'@vue/shared', | ||
'@unhead/vue', | ||
'@nuxt/devtools-kit', | ||
'#app/composables/state', | ||
'#app/entry', | ||
'#build/plugins', | ||
], | ||
failOnWarn: false, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"name": "@storybook-vue/nuxt", | ||
"type": "module", | ||
"version": "0.2.7", | ||
"packageManager": "pnpm@8.6.12", | ||
"description": "Storybook for Nuxt and Vite: Develop Vue3 components in isolation with Hot Reloading.", | ||
"license": "MIT", | ||
"homepage": "https://github.com/storybook-vue/storybook-nuxt", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/storybook-vue/storybook-nuxt.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/storybook-vue/storybook-nuxt/issues" | ||
}, | ||
"keywords": [ | ||
"storybook", | ||
"nuxt", | ||
"vite", | ||
"vue3" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"node": "./dist/index.cjs", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"./preset": { | ||
"types": "./dist/preset.d.ts", | ||
"require": "./dist/preset.cjs" | ||
}, | ||
"./preview": { | ||
"types": "./dist/preview.d.ts", | ||
"import": "./dist/preview.mjs", | ||
"default": "./preview.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*", | ||
"template/**/*", | ||
"README.md", | ||
"*.js", | ||
"*.mjs", | ||
"*.cjs", | ||
"*.d.ts" | ||
], | ||
"engines": { | ||
"node": ">=18.0.0" | ||
}, | ||
"scripts": { | ||
"build": "unbuild", | ||
"build:watch": "unbuild --stub", | ||
"test": "vitest run", | ||
"dev": "unbuild && cd playground && storybook dev -p 6006", | ||
"prepack": "unbuild", | ||
"release": "pnpm changelogen --release --push && pnpm publish" | ||
}, | ||
"peerDependencies": { | ||
"nuxt": "^3.6 || ^3.7 || ^3.8", | ||
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0", | ||
"vue": "^3.0.0" | ||
}, | ||
"dependencies": { | ||
"@nuxt/devtools-kit": "^1.0.6", | ||
"@nuxt/kit": "^3.11.1", | ||
"@nuxt/schema": "^3.11.1", | ||
"@nuxt/types": "2.17.2", | ||
"@nuxt/vite-builder": "^3.11.1", | ||
"@storybook/builder-vite": "^8.0.0", | ||
"@storybook/vue3": "^8.0.0", | ||
"@storybook/vue3-vite": "^8.0.0", | ||
"autoprefixer": "^10.4.16", | ||
"nuxt": "^3.11.1", | ||
"postcss": "^8.4.33", | ||
"postcss-import": "^15.1.0", | ||
"postcss-url": "^10.1.3", | ||
"typescript": "^5.4.3", | ||
"vue": "^3.4.21" | ||
}, | ||
"devDependencies": { | ||
"@storybook/types": "^8.0.0", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"@vitejs/plugin-vue-jsx": "^3.1.0", | ||
"changelogen": "^0.5.5", | ||
"unbuild": "^2.0.0", | ||
"vite": "^5.2.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"bundler": { | ||
"entries": [ | ||
"./src/index.ts", | ||
"./src/preview.ts", | ||
"./src/preset.ts" | ||
], | ||
"platform": "node" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.nuxt | ||
.nuxt-storybook | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { StorybookConfig } from "@storybook-vue/nuxt"; | ||
|
||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
"../stories/**/*.mdx", | ||
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook-vue/nuxt", | ||
options: { | ||
docgen :"vue-component-meta" | ||
}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
}; | ||
export default config; |
Oops, something went wrong.