Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(aio): move file cleaning to later in the doc gen #21540

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion aio/package.json
Expand Up @@ -39,7 +39,6 @@
"check-env": "yarn ~~check-env",
"postcheck-env": "yarn aio-check-local",
"payload-size": "scripts/payload.sh",
"predocs": "rimraf src/generated/{docs,*.json}",
"docs": "dgeni ./tools/transforms/angular.io-package",
"docs-watch": "node tools/transforms/authors-package/watchr.js",
"docs-lint": "eslint --ignore-path=\"tools/transforms/.eslintignore\" tools/transforms",
Expand Down
1 change: 1 addition & 0 deletions aio/tools/transforms/angular.io-package/index.js
Expand Up @@ -17,6 +17,7 @@ module.exports = new Package('angular.io', [gitPackage, apiPackage, contentPacka

// This processor relies upon the versionInfo. See below...
.processor(require('./processors/processNavigationMap'))
.processor(require('./processors/cleanGeneratedFiles'))

// We don't include this in the angular-base package because the `versionInfo` stuff
// accesses the file system and git, which is slow.
Expand Down
@@ -0,0 +1,10 @@
const rimraf = require('rimraf');
module.exports = function cleanGeneratedFiles() {
return {
$runAfter: ['writing-files'],
$runBefore: ['writeFilesProcessor'],
$process: function() {
rimraf.sync('src/generated/{docs,*.json}');
}
};
};