forked from ember-bootstrap/ember-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (34 loc) · 1006 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
36
37
38
39
/* eslint-env node */
var gulp = require('gulp');
var conventionalChangelog = require('gulp-conventional-changelog');
var ghPages = require('gulp-gh-pages');
var exec = require('child_process').exec;
var merge = require('merge-stream');
var striptags = require('striptags')
var transform = require('gulp-transform');
gulp.task('docs', ['docs:publish']);
gulp.task('docs:api', function(cb) {
exec('ember ember-cli-yuidoc', function(err) {
cb(err);
});
});
gulp.task('docs:app', function(cb) {
exec('ember build --prod', function(err) {
cb(err);
});
});
gulp.task('docs:publish', ['docs:api', 'docs:app'], function() {
return merge(
gulp.src('docs/api/**/*', { base: 'docs' }),
gulp.src('dist/**/*'),
gulp.src('CHANGELOG.md').pipe(transform(striptags, { encoding: 'utf8' }))
)
.pipe(ghPages());
});
gulp.task('changelog', function() {
return gulp.src('CHANGELOG.md')
.pipe(conventionalChangelog({
preset: 'angular'
}))
.pipe(gulp.dest('./'));
});