-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dgeni): run design packages (#2968)
- Loading branch information
Showing
1 changed file
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
}); |