Skip to content

Commit

Permalink
46
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Schaffer committed Mar 14, 2019
1 parent e64ff6f commit 6f3c7de
Show file tree
Hide file tree
Showing 13 changed files with 336 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -26,7 +26,7 @@
}
},
{
"files": ["**/src/**/*.ts", "**/test/**/*.ts", "_examples/*/**/*.ts"],
"files": ["**/src/**/*.ts", "**/test/**/*.ts", "_examples/*/**/*.ts", "util/typedoc/typedoc-plugin-module-name-by-package/**/*.js"],
"parserOptions": {
"sourceType": "module"
},
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,3 +10,4 @@ dist
.env
.aws-docker
.tsconfig.*
docs
16 changes: 16 additions & 0 deletions builder/src/builder-project.ts
Expand Up @@ -129,13 +129,29 @@ export class BuilderProject implements BuilderConfig, BuilderProjectOptions {
relative(this.projectPath, resolve(pkg.path, 'index.ts')),
relative(this.projectPath, resolve(pkg.path, 'src/**/*.ts')),
)
if (pkg.subPackages) {
pkg.subPackages.forEach(subPkg => {
result.push(
relative(this.projectPath, resolve(pkg.path, subPkg, 'index.ts')),
relative(this.projectPath, resolve(pkg.path, subPkg, 'src/**/*.ts')),
)
})
}
return result
}, []),
exclude: packages.reduce((result, pkg) => {
result.push(
relative(this.projectPath, resolve(pkg.path, 'node_modules')),
relative(this.projectPath, resolve(pkg.path, '**/*.spec.ts')),
)
if (pkg.subPackages) {
pkg.subPackages.forEach(subPkg => {
result.push(
relative(this.projectPath, resolve(pkg.path, subPkg, 'node_modules')),
relative(this.projectPath, resolve(pkg.path, subPkg, '**/*.spec.ts')),
)
})
}
return result
}, []),
references: packages.map(pkg => ({
Expand Down
177 changes: 163 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -16,7 +16,9 @@
"precoverage": "rimraf .coverage .nyc_output",
"coverage": "nyc mocha",
"coverage-report": "nyc report --reporter=text-lcov | coveralls",
"coverage:watch": "nyc npm test -- --watch"
"coverage:watch": "nyc npm test -- --watch",
"prebuild-docs": "rimraf ./docs && builder update-configs",
"build-docs": "typedoc --options ./typedoc.json"
},
"repository": {
"type": "git",
Expand All @@ -42,6 +44,7 @@
"chai-as-promised": "^7.1.1",
"colors": "^1.3.3",
"coveralls": "^3.0.2",
"docfx": "^1.0.5",
"eslint": "^5.12.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-mocha": "^5.2.0",
Expand All @@ -57,6 +60,7 @@
"ts-custom-error-shim": "^1.0.0",
"ts-node": "^7.0.1",
"tsconfig-paths": "^3.7.0",
"typedoc": "^0.14.2",
"typescript": "^3.2.2",
"typescript-eslint-parser": "^21.0.2",
"uuid": "^3.3.2"
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.docs.json
@@ -0,0 +1,3 @@
{
"extends": "./.tsconfig.builder.json"
}
13 changes: 13 additions & 0 deletions typedoc.json
@@ -0,0 +1,13 @@
{
"name": "@dandi",
"mode": "modules",
"out": "docs",
"tsconfig": "./.tsconfig.builder.json",
"exclude": "_examples",
"includeDeclarations": true,
"excludeExternals": true,
"excludePrivate": true,
"excludeNotExported": true,
"listInvalidSymbolLinks": true,
"readme": "./README.md"
}
3 changes: 3 additions & 0 deletions util/typedoc/typedoc-plugin-module-name-by-package/.gitignore
@@ -0,0 +1,3 @@
src/*.js
src/*.d.ts
src/*.map
6 changes: 6 additions & 0 deletions util/typedoc/typedoc-plugin-module-name-by-package/index.js
@@ -0,0 +1,6 @@
const plugin = require('./src/plugin')

module.exports = function(PluginHost) {
const app = PluginHost.owner
app.converter.addComponent(plugin.PLUGIN_NAME, plugin.ModuleNameByPackagePlugin)
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f3c7de

Please sign in to comment.