diff --git a/.gitignore b/.gitignore index 4cb8d8bb6..b7b9f2cda 100644 --- a/.gitignore +++ b/.gitignore @@ -45,5 +45,6 @@ yarn-error.log* # typescript tsconfig.tsbuildinfo -# typedoc -/typedoc/ \ No newline at end of file +# generated docs +public/docs +public/storybook \ No newline at end of file diff --git a/next.config.js b/next.config.js index f39d094ad..79aff8bdf 100644 --- a/next.config.js +++ b/next.config.js @@ -13,6 +13,16 @@ module.exports = { }, async redirects() { return [ + { + source: '/storybook', + destination: '/storybook/index.html', + permanent: true, + }, + { + source: '/docs', + destination: '/docs/index.html', + permanent: true, + }, { source: '/my', destination: '/my/home', diff --git a/package.json b/package.json index eb859c7ca..7efa53f87 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "next build", "start": "next start -p 80", "devserver": "next dev -p 3000", + "docs:build": "storybook build -o public/storybook && typedoc --out public/docs", "lint:eslint": "eslint src integrationTesting", "lint:prettier": "prettier --check src integrationTesting", "lint:translations": "ts-node src/tools/lint-translations", @@ -21,8 +22,7 @@ "playwright:skipbuild": "cross-env NODE_ENV=production SKIP_BUILD=1 playwright test", "playwright:ci": "cross-env NODE_ENV=production playwright test", "storybook": "storybook dev -p 6006", - "make-yaml": "ts-node src/tools/make-yaml.ts", - "build-storybook": "storybook build" + "make-yaml": "ts-node src/tools/make-yaml.ts" }, "dependencies": { "@date-io/date-fns": "1.x", diff --git a/tsconfig.json b/tsconfig.json index bb80c0a5b..24ac6ed89 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -49,6 +49,8 @@ "exclude": [ ".next", "node_modules", - "storybook-static" + "storybook-static", + "public/storybook", + "public/docs" ] }