Skip to content

Commit 84f59f0

Browse files
author
Nick Salloum
committed
updates gulpfile to have the simple task of compiling the scss
1 parent 7db80ff commit 84f59f0

File tree

1 file changed

+7
-40
lines changed

1 file changed

+7
-40
lines changed

gulpfile.js

+7-40
Original file line numberDiff line numberDiff line change
@@ -6,70 +6,37 @@
66
*/
77
var gulp = require('gulp');
88
var autoprefixer = require('gulp-autoprefixer');
9-
var browserSync = require('browser-sync').create();
109
var cssmin = require('gulp-cssmin');
11-
var jshint = require('gulp-jshint');
12-
var notify = require('gulp-notify');
1310
var rename = require('gulp-rename');
1411
var sass = require('gulp-sass');
15-
var stylish = require('jshint-stylish');
16-
17-
/**
18-
* Paths
19-
*/
20-
var paths = {
21-
scss: ['scss/**/*.scss'],
22-
scripts: ['js/src/**/*.js']
23-
};
2412

2513
/**
2614
* Styles
2715
*/
2816
gulp.task('styles', function() {
29-
return gulp.src(paths.scss)
17+
return gulp.src('src/flexgrid.scss')
3018
.pipe(sass({
3119
outputStyle: 'expanded'
3220
}))
33-
.on('error', notify.onError({
34-
title: 'Error compiling Sass',
35-
message: 'Check the console for info'
36-
}))
3721
.on('error', sass.logError)
3822
.pipe(autoprefixer())
39-
.pipe(gulp.dest('css'))
23+
.pipe(gulp.dest('dist'))
4024
.pipe(cssmin())
4125
.pipe(rename({
4226
suffix: '.min'
4327
}))
44-
.pipe(gulp.dest('css'));
28+
.pipe(gulp.dest('dist'));
4529
});
4630

4731
/**
48-
* Scripts linting
32+
* Watch task for development
4933
*/
50-
gulp.task('lint', function() {
51-
return gulp.src(paths.scripts)
52-
.pipe(jshint())
53-
.pipe(jshint.reporter(stylish));
54-
});
55-
56-
/**
57-
* Serve task
58-
*/
59-
gulp.task('serve', ['styles', 'lint'], function() {
60-
browserSync.init({
61-
server: {
62-
baseDir: './'
63-
}
64-
});
65-
66-
gulp.watch(paths.scss, ['styles']);
67-
gulp.watch(paths.scripts, ['lint']);
68-
gulp.watch('./*.html').on('change', browserSync.reload);
34+
gulp.task('watch', function() {
35+
gulp.watch('src/flexgrid.scss', ['styles']);
6936
});
7037

7138
/**
7239
* Default task
7340
*/
74-
gulp.task('default', ['styles', 'lint']);
41+
gulp.task('default', ['styles']);
7542
})();

0 commit comments

Comments
 (0)