diff --git a/packages/molecule/index.d.ts b/packages/molecule/molecule.d.ts similarity index 100% rename from packages/molecule/index.d.ts rename to packages/molecule/molecule.d.ts diff --git a/packages/molecule/package.json b/packages/molecule/package.json index 54fbd85e2..79b06fcef 100644 --- a/packages/molecule/package.json +++ b/packages/molecule/package.json @@ -2,8 +2,8 @@ "name": "@dtinsight/molecule", "version": "0.9.0-beta.4.2", "description": "A Web IDE UI Framework built with React.js, inspired by VSCode.", - "module": "./index.d.ts", - "typings": "./index.d.ts", + "module": "./molecule.d.ts", + "typings": "./molecule.d.ts", "scripts": {}, "keywords": [ "react.js", diff --git a/packages/molecule/tsconfig.json b/packages/molecule/tsconfig.json new file mode 100644 index 000000000..6812e9c8a --- /dev/null +++ b/packages/molecule/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "es6", + "target": "es6", + "declaration": true, + "preserveConstEnums": true, + "sourceMap": false, + "outDir": "./", + "rootDir": "./", + "baseUrl": "./" + }, + "include": ["./"] +} diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index c897e1e11..c24a2c76f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -33,8 +33,12 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula'); 'docusaurus-plugin-typedoc', // Plugin / TypeDoc options { - entryPoints: ['../src/index.ts'], - tsconfig: '../tsconfig.json', + entryPoints: [ + '../packages/molecule/molecule.d.ts', + '../packages/molecule/ui.d.ts', + '../packages/molecule/monaco.d.ts', + ], + tsconfig: '../packages/molecule/tsconfig.json', name: 'Molecule', readme: 'none', excludeExternals: true, diff --git a/website/sidebars.js b/website/sidebars.js index 16155caf6..231ef32de 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -50,17 +50,26 @@ module.exports = { ], api: [ 'api/index', - 'api/namespaces/molecule', + { + type: 'category', + label: 'Modules', + collapsed: false, + items: [ + { + type: 'autogenerated', + dirName: 'api/modules', + }, + ], + }, { type: 'category', label: 'Namespaces', collapsed: false, items: [ - 'api/namespaces/molecule.component', - 'api/namespaces/molecule.model', - 'api/namespaces/molecule.react', - 'api/namespaces/molecule.event', - 'api/namespaces/molecule.monaco', + { + type: 'autogenerated', + dirName: 'api/namespaces', + }, ], }, {