forked from ember-bootstrap/ember-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (34 loc) · 1021 Bytes
/
gulpfile.js
File metadata and controls
39 lines (34 loc) · 1021 Bytes
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 */
const gulp = require('gulp');
const conventionalChangelog = require('gulp-conventional-changelog');
const ghPages = require('gulp-gh-pages');
const exec = require('child_process').exec;
const merge = require('merge-stream');
const striptags = require('striptags');
const 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('./'));
});