Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/blade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"react-native:storybook:start": "yarn react-native:get-stories && cross-env NODE_OPTIONS=--openssl-legacy-provider FRAMEWORK=REACT_NATIVE react-native start --reset-cache",
"react": "yarn run react:storybook",
"react:storybook": "cross-env FRAMEWORK=REACT storybook dev -c ./.storybook/react -p 9009",
"react:storybook:build": "yarn generate-docs-lockfile && cross-env FRAMEWORK=REACT storybook build -c ./.storybook/react -o storybook-site --quiet",
"react:storybook:build": "yarn generate-docs-lockfile && cross-env FRAMEWORK=REACT storybook build -c ./.storybook/react -o storybook-site --quiet && node ./scripts/copyDashboard.js",
"react:storybook:serve": "http-server storybook-site --port 9009 --silent",
"react:storybook:serve:test": "wait-on http://127.0.0.1:9009/ && yarn test:react:interaction",
"test:react:interaction": "cross-env FRAMEWORK=REACT test-storybook -c ./.storybook/react --url http://127.0.0.1:9009/",
Expand Down
12 changes: 12 additions & 0 deletions packages/blade/public/dashboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
</head>
<body>
<h1>hello</h1>
</body>
</html>

21 changes: 21 additions & 0 deletions packages/blade/scripts/copyDashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const fs = require('fs');
const path = require('path');

const dashboardSource = path.join(__dirname, '../public/dashboard.html');
const storybookSiteDir = path.join(__dirname, '../storybook-site');
const dashboardDir = path.join(storybookSiteDir, 'dashboard');
const dashboardDest = path.join(dashboardDir, 'index.html');

// Create dashboard directory if it doesn't exist
if (!fs.existsSync(dashboardDir)) {
fs.mkdirSync(dashboardDir, { recursive: true });
}

// Copy dashboard.html to storybook-site/dashboard/index.html
if (fs.existsSync(dashboardSource)) {
fs.copyFileSync(dashboardSource, dashboardDest);
console.log('✓ Dashboard HTML copied to storybook-site/dashboard/index.html');
} else {
console.warn('⚠ Warning: dashboard.html not found at', dashboardSource);
}

Check failure on line 21 in packages/blade/scripts/copyDashboard.js

View workflow job for this annotation

GitHub Actions / Validate Source Code

Delete `⏎`
Loading