forked from ember-bootstrap/ember-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
35 lines (29 loc) · 914 Bytes
/
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
34
35
var gulp = require('gulp');
var ghpages = require('gh-pages');
var path = require('path');
var file = require('gulp-file');
gulp.task('docs', ['docs:publish']);
gulp.task('docs:generate', function (cb) {
var exec = require('child_process').exec;
exec('ember ember-cli-yuidoc', function (err, stdout, stderr) {
cb(err);
});
});
gulp.task('docs:copyChangelog', function () {
return gulp.src('CHANGELOG.md')
.pipe(gulp.dest('docs'))
});
gulp.task('docs:publish', ['docs:generate','docs:copyChangelog'], function () {
ghpages.publish(path.join(__dirname, 'docs'), {
src: '{api/**/*,CHANGELOG.md}',
add: true
});
});
gulp.task('docs:changelog', function (done) {
require('conventional-changelog')({
}, function(err, log) {
file('CHANGELOG.md', log, { src: true })
.pipe(gulp.dest('./'))
.on('end', done);
});
});