Skip to content

Commit 2df4622

Browse files
committed
fix gulpfile.js
1 parent 5c519c6 commit 2df4622

File tree

1 file changed

+13
-32
lines changed

1 file changed

+13
-32
lines changed

gulpfile.js

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,13 @@ var reload = browserSync.reload;
1313

1414
var src_paths = {
1515
sass: ['sass/_flexbox-grid-mixins.scss'],
16-
doc: ['doc/sass/*.scss'],
17-
gh_pages: [
18-
'doc/**',
19-
'!doc/sass', '!doc/sass/**'
20-
]
21-
};
22-
23-
var watch_paths = {
24-
sass: ['sass/_flexbox-grid-mixins.scss'],
25-
doc: ['doc/sass/*.scss'],
26-
doc_static: ['doc/*.html', 'doc/**/*.html']
27-
};
28-
29-
var build_paths = {
30-
doc: []
16+
docs_sass: ['docs/sass/*.scss'],
17+
docs_static: ['docs/*.html', 'docs/**/*.html']
3118
};
3219

3320
var dest_paths = {
34-
browserSync: 'doc',
35-
doc_css: 'doc/css/',
36-
gh_pages: 'gh_pages'
21+
browserSync: 'docs',
22+
docs_css: 'docs/css/'
3723
};
3824

3925
gulp.task('lint:sass', function() {
@@ -52,8 +38,8 @@ gulp.task('lint:sass', function() {
5238
.pipe(scsslint.failReporter());
5339
});
5440

55-
gulp.task('doc', function() {
56-
return gulp.src(src_paths.doc)
41+
gulp.task('docs_sass', function() {
42+
return gulp.src(src_paths.docs_sass)
5743
.pipe($.plumber({
5844
errorHandler: function(err) {
5945
console.log(err.messageFormatted);
@@ -65,7 +51,7 @@ gulp.task('doc', function() {
6551
browsers: ['last 2 versions'],
6652
cascade: false
6753
}))
68-
.pipe(gulp.dest(dest_paths.doc_css))
54+
.pipe(gulp.dest(dest_paths.docs_css))
6955
.pipe(browserSync.stream());
7056
});
7157

@@ -76,14 +62,9 @@ gulp.task('browser-sync', function() {
7662
}
7763
});
7864

79-
gulp.watch(watch_paths.sass, ['default']).on('change', reload);
80-
gulp.watch(watch_paths.doc, ['doc']).on('change', reload);
81-
gulp.watch(watch_paths.doc_static).on('change', reload);
82-
});
83-
84-
gulp.task('gh_pages', function() {
85-
return gulp.src(src_paths.gh_pages)
86-
.pipe( gulp.dest(dest_paths.gh_pages) );
65+
gulp.watch(src_paths.sass, ['default']).on('change', reload);
66+
gulp.watch(src_paths.docs_sass, ['docs_sass']);
67+
gulp.watch(src_paths.docs_static).on('change', reload);
8768
});
8869

8970
gulp.task('lint', ['lint:sass']);
@@ -92,12 +73,12 @@ gulp.task('serve', ['browser-sync']);
9273
gulp.task('default', function(callback) {
9374
runSequence(
9475
'lint',
95-
'doc',
76+
'docs_sass',
9677
callback
9778
);
9879
});
9980

10081
gulp.task('watch', function() {
101-
gulp.watch(watch_paths.sass, ['default']);
102-
gulp.watch(watch_paths.doc, ['doc']);
82+
gulp.watch(src_paths.sass, ['default']);
83+
gulp.watch(src_paths.docs_sass, ['docs_sass']);
10384
});

0 commit comments

Comments
 (0)