forked from ember-bootstrap/ember-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
40 lines (34 loc) · 1.07 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
34
35
36
37
38
39
40
var gulp = require('gulp');
var ghpages = require('gh-pages');
var path = require('path');
var file = require('gulp-file');
var striptags = require('striptags')
var transform = require('gulp-transform');
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')
// jekyll seems to have a problem with mixed html/markdown
// so strip away html for docs
.pipe(transform(striptags, {encoding: 'utf8'}))
.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);
});
});