forked from ng-bootstrap/ng-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
33 lines (28 loc) · 1.21 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const gulp = require('gulp');
const ghPages = require('gulp-gh-pages');
const clangFormat = require('clang-format');
const gulpFormat = require('gulp-clang-format');
gulp.task('changelog', function() {
const conventionalChangelog = require('gulp-conventional-changelog');
return gulp.src('CHANGELOG.md', {})
.pipe(conventionalChangelog({preset: 'angular', releaseCount: 1}, {
// Override release version to avoid `v` prefix for git comparison
// See https://github.com/conventional-changelog/conventional-changelog-core/issues/10
currentTag: require('./package.json').version
}))
.pipe(gulp.dest('./'));
});
// Formatting
gulp.task('check-format', function() {
return gulp.src(['gulpfile.js', 'misc/*.ts', 'src/**/*.ts', 'e2e-app/**/*.ts'])
.pipe(gulpFormat.checkFormat('file', clangFormat))
.on('warning', function(e) {
console.log("See https://github.com/ng-bootstrap/ng-bootstrap/blob/master/DEVELOPER.md#clang-format");
process.exit(1);
});
});
// Demo
gulp.task('demo-push', function() {
return gulp.src('demo/dist/**/*')
.pipe(ghPages({remoteUrl: "https://github.com/ng-bootstrap/ng-bootstrap.github.io.git", branch: "master"}));
});