-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
257 additions
and
115 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
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
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
File renamed without changes.
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
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/storylite/src/plugins/vite-plugin-remove-testid/index.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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,10 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/eslintrc.json", | ||
"extends": ["../../.eslintrc.js"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"react/prop-types": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-key": "warn" | ||
} | ||
} |
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,25 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
vite.config.ts.timestamp-* |
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,46 @@ | ||
# @storylite/vite-plugin | ||
|
||
## 0.2.0 | ||
|
||
### Breaking Changes | ||
|
||
- big refactoring to use context instead of virtual modules. | ||
- fixes stories resolution and the issues with the virtual modules being bundled. | ||
- changed: renamed `StoryLiteRouter` -> `StoryLiteApp` | ||
- changed: plugin config now only accepts the `stories` option, which is the relative glob path to the stories. | ||
- changed: `StoryLiteApp` now requires a `stories` prop, which the modules map of the stories, you can load them | ||
dynamically with `import stories from 'virtual:storylite-stories'` | ||
(make sure you import it in the ts config types as `"@storylite/vite-plugin/dist/virtual-modules.d.ts"`) | ||
and Vite with the StoryLite plugin will take care of the rest. Check the react examples for more info. | ||
|
||
### Patch Changes | ||
|
||
- update react-router-dom to 6.15.0 | ||
|
||
## 0.1.3 | ||
|
||
### Patch Changes | ||
|
||
- better dependency definitions | ||
|
||
## 0.1.2 | ||
|
||
### Patch Changes | ||
|
||
- fix: router has now fully static site support. fix navigation. | ||
|
||
## 0.1.1 | ||
|
||
### Patch Changes | ||
|
||
- fix: license | ||
|
||
## 0.1.0 | ||
|
||
### Minor Changes | ||
|
||
- 134cf89: refactor: The project is now basically a plugin to integrate with Vite, with a React app. | ||
|
||
### Patch Changes | ||
|
||
- d4e07ac: initial Vite project setup |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Javi Aguilar | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,30 @@ | ||
# @storylite/vite-plugin | ||
|
||
A Vite plugin to integrate StoryLite with Vite. | ||
|
||
## Installation | ||
|
||
```bash | ||
|
||
npm i -D @storylite/vite-plugin | ||
|
||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
// vite.config.ts | ||
|
||
/// <reference types="vite/client" /> | ||
|
||
import storylite from '@storylite/vite-plugin' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
storylite({ | ||
stories: 'stories/**/*.stories.tsx', // relative to process.cwd() | ||
}), | ||
], | ||
}) | ||
``` |
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,38 @@ | ||
{ | ||
"name": "@storylite/vite-plugin", | ||
"version": "0.2.0", | ||
"description": "A lightweight alternative to StoryBook, built on top of Vite⚡️", | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsup", | ||
"dev": "sleep 10 && tsup --watch --clean", | ||
"lint": "eslint --max-warnings=10 .", | ||
"lint-fix": "eslint --fix .", | ||
"prepublishOnly": "pnpm run build", | ||
"publint-check": "pnpm publint", | ||
"type-check": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"vite": "^4.4.9" | ||
}, | ||
"devDependencies": { | ||
"@r1stack/coding-style": "^0.2.1", | ||
"@types/node": "^20.4.9", | ||
"publint": "^0.2.0", | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.1.6" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion
4
...rc/plugins/vite-plugin-storylite/index.ts → packages/vite-plugin/src/index.ts
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
File renamed without changes.
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,4 @@ | ||
{ | ||
"extends": "@r1stack/coding-style/tsconfig/base.json", | ||
"include": ["src", "*.ts"] | ||
} |
Oops, something went wrong.