Skip to content

Commit db0d458

Browse files
author
Dohyung Ahn
committed
env: refine docs building process
* use `tuidoc` instead of storybook
1 parent 4619c6e commit db0d458

File tree

5 files changed

+11
-36
lines changed

5 files changed

+11
-36
lines changed

apps/calendar/.storybook/main.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
const path = require('path');
22

3-
const isBuildingDocs = process.env.STORYBOOK_ENV === 'docs';
4-
53
module.exports = {
64
core: {
75
builder: 'webpack5',
86
},
9-
stories: isBuildingDocs ? ['../**/*.stories.mdx'] : ['../**/*.stories.@(ts|tsx|mdx)'],
7+
stories: ['../**/*.stories.@(ts|tsx)'],
108
addons: ['@storybook/addon-docs'],
11-
staticDirs: ['../docs/assets/'],
129
babel: async (config) => {
1310
// Replace storybook babel preset & plugins with custom ones
1411
config.presets.splice(config.presets.length - 1, 1, [

apps/calendar/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
"develop": "npm run storybook",
6464
"storybook": "start-storybook -p 6006",
6565
"storybook:build": "build-storybook",
66-
"storybook:build:docs": "STORYBOOK_ENV=docs build-storybook -o ../../_docs"
66+
"docs:prebuild": "tsc --outDir tmpdoc --sourceMap false",
67+
"docs:dev": "npm run docs:prebuild && tuidoc --serv",
68+
"docs:build": "npm run docs:prebuild && tuidoc"
6769
}
6870
}

apps/calendar/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"compilerOptions": {
33
"noImplicitAny": true,
44
"target": "es6",
5-
"jsx": "preserve",
6-
"jsxFactory": "h",
7-
"jsxFragmentFactory": "Fragment",
5+
"jsx": "react-jsx",
6+
"jsxImportSource": "preact",
87
"esModuleInterop": true,
98
"isolatedModules": true,
109
"allowSyntheticDefaultImports": true,

apps/calendar/tuidoc.config.json

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"footer": [
1212
{
13-
"title": "NHN",
13+
"title": "NHN Cloud",
1414
"linkUrl": "https://github.com/nhn"
1515
},
1616
{
@@ -23,32 +23,9 @@
2323
},
2424
"api": {
2525
"filePath": [
26-
"src/js/factory/calendar.js",
27-
"src/js/theme/themeConfig.js",
28-
"src/js/common/timezone.js"
29-
]
30-
},
31-
"examples": {
32-
"filePath": "examples",
33-
"titles": {
34-
"example00-basic": "Calendar App",
35-
"example01-monthly": "Monthly",
36-
"example02-weekly": "Weekly",
37-
"example03-daily": "Daily",
38-
"example04-2-weeks": "2 Weeks",
39-
"example05-3-weeks": "3 Weeks",
40-
"example06-narrow-weekends": "Narrower Weekends",
41-
"example07-hide-weekends": "Hide Weekends",
42-
"example08-task-n-schedule": "Task & Schedule",
43-
"example09-task-only": "Task Only",
44-
"example10-common-theme": "Common Theme",
45-
"example11-monthly-theme": "Monthly Theme",
46-
"example12-weekly-theme": "Weekly Theme",
47-
"example13-timezone": "Timezone",
48-
"example14-template-for-month": "Template for Month",
49-
"example15-template-for-timegrid": "Template for Week, Day",
50-
"example16-template-for-popup": "Template for Popup"
51-
}
26+
"tmpdoc/src/factory/calendarControl.jsx"
27+
],
28+
"permalink": false
5229
},
5330
"pathPrefix": "tui.calendar"
5431
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)