diff --git a/libs/monorepo-changelog/.gitignore b/libs/monorepo-changelog/.gitignore index 0ebac2d4..e3928ff6 100644 --- a/libs/monorepo-changelog/.gitignore +++ b/libs/monorepo-changelog/.gitignore @@ -31,3 +31,4 @@ lerna-debug.log* !.vscode/launch.json !.vscode/extensions.json **/i18n/index.d.ts +docs diff --git a/libs/monorepo-changelog/package.json b/libs/monorepo-changelog/package.json index 2f3e8bd4..c7caaacf 100644 --- a/libs/monorepo-changelog/package.json +++ b/libs/monorepo-changelog/package.json @@ -13,7 +13,7 @@ "docs:server": "live-server docs", "docs:dev": "typedoc --watch", "docs:build": "rimraf docs && typedoc", - "docs:deploy": "yarn build && gh-pages -d docs/ -e / -a" + "docs:deploy": "yarn docs:build && gh-pages -d docs/ -e /monorepo-changelog -a" }, "publishConfig": { "access": "public", @@ -42,6 +42,7 @@ "@types/jest": "^26.0.23", "@types/lodash": "^4.14.168", "@types/node": "^12.20.6", + "gh-pages": "^3.2.3", "jest": "^26.6.3", "rimraf": "^3.0.2", "ts-jest": "^26.5.6", diff --git a/libs/monorepo-changelog/src/bin.ts b/libs/monorepo-changelog/src/bin.ts index 8ee453e9..2bab757a 100644 --- a/libs/monorepo-changelog/src/bin.ts +++ b/libs/monorepo-changelog/src/bin.ts @@ -1,3 +1,10 @@ -import { changelogCommand } from './' +import { Command } from 'commander' +import path from 'path' +import { ChangelogProgram } from './cli/ChangelogProgram' -changelogCommand.parse() +new Command('changelog') + .action(async () => { + const changelogProgram = new ChangelogProgram(path.resolve()) + await changelogProgram.generate() + }) + .parse() diff --git a/libs/monorepo-changelog/src/index.ts b/libs/monorepo-changelog/src/index.ts index 5802325a..c8bf1a90 100644 --- a/libs/monorepo-changelog/src/index.ts +++ b/libs/monorepo-changelog/src/index.ts @@ -1,12 +1,3 @@ -import { Command } from 'commander' -import { ChangelogProgram } from './cli/ChangelogProgram' -import path from 'path' - export * from './service/Generator' export * from './service/Scanner' export * from './cli/ChangelogProgram' - -export const changelogCommand = new Command('changelog').action(async () => { - const changelogProgram = new ChangelogProgram(path.resolve()) - await changelogProgram.generate() -}) diff --git a/yarn.lock b/yarn.lock index acdc70da..921ef200 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1284,6 +1284,7 @@ __metadata: "@types/node": ^12.20.6 commander: ^7.0.0 fs-extra: ^10.0.0 + gh-pages: ^3.2.3 jest: ^26.6.3 lodash: ^4.17.21 rimraf: ^3.0.2