Skip to content

Commit

Permalink
feat(dgeni): run design packages (#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 committed Aug 14, 2024
1 parent eb16f86 commit 9753072
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions tools/dgeni/build.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
import { Dgeni } from 'dgeni';
import { rimraf } from 'rimraf';

import { apiDocs } from './src/transforms/daffodil-api-package';
import {
apiDocs,
designApiPackage,
} from './src/transforms/daffodil-api-package';
import { designExamplePackage } from './src/transforms/daffodil-design-examples-package';
import {
packageDocsPackage,
guideDocsPackage,
explanationDocsPackage,
designDocsPackage,
} from './src/transforms/daffodil-guides-package';

rimraf('../../dist/docs/*', { glob: true }).then(() => {
new Dgeni([apiDocs]).generate().then(() => {
new Dgeni([packageDocsPackage]).generate().catch(() => process.exit(1));
new Dgeni([guideDocsPackage]).generate().catch(() => process.exit(1));
new Dgeni([explanationDocsPackage]).generate().catch(() => process.exit(1));
new Dgeni([designExamplePackage]).generate().catch(() => process.exit(1));
// base docs
Promise.all([
new Dgeni([packageDocsPackage]).generate().catch(() => process.exit(1)),
new Dgeni([guideDocsPackage]).generate().catch(() => process.exit(1)),
new Dgeni([explanationDocsPackage]).generate().catch(() => process.exit(1)),
]).then(() => {
// design docs
// run them after base docs so that config between shared processors does not conflict
// a design flaw of dgeni, it wasn't meant to be run in parallel
new Dgeni([designApiPackage]).generate().then(() => {
new Dgeni([designDocsPackage]).generate().catch(() => process.exit(1));
new Dgeni([designExamplePackage]).generate().catch(() => process.exit(1));
}).catch(() => process.exit(1));
}).catch(() => process.exit(1));

}).catch(() => process.exit(1));
});

0 comments on commit 9753072

Please sign in to comment.