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

Add auto-generate stamp to certain pages. #345

Merged
merged 3 commits into from Mar 23, 2017
Merged
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
5 changes: 5 additions & 0 deletions gulp-tasks/documentation.js
Expand Up @@ -29,6 +29,8 @@ navigation_weight: 0

`;

const AUTO_GENERATED = '<!-- DO NOT EDIT. This page is autogenerated. -->';

/**
* Documents a given project.
* @param {String} projectPath The path to a project directory.
Expand All @@ -55,6 +57,7 @@ const documentPackage = (projectPath) => {
gulp.src('templates/Project-README.hbs')
.pipe(handlebars(handleBarsData))
.pipe(rename('README.md'))
.pipe(insert.prepend(AUTO_GENERATED))
.pipe(gulp.dest(projectPath))
.on('end', resolve);
});
Expand Down Expand Up @@ -96,6 +99,7 @@ gulp.task('documentation:repo', () => {
gulp.src('templates/README.hbs')
.pipe(handlebars({projects: projects}))
.pipe(rename({extname: '.md'}))
.pipe(insert.prepend(AUTO_GENERATED))
.pipe(gulp.dest('.'))
.on('end', resolve);
});
Expand All @@ -105,6 +109,7 @@ gulp.task('documentation:repo', () => {
gulp.src('./README.md')
.pipe(rename({basename: 'index'}))
.pipe(insert.prepend(FRONT_MATTER))
.pipe(insert.prepend(AUTO_GENERATED))
.pipe(gulp.dest('./docs/'))
.on('end', resolve);
});
Expand Down