Skip to content

Commit

Permalink
Cleaning!
Browse files Browse the repository at this point in the history
  • Loading branch information
bpodwinski committed Sep 27, 2017
1 parent 9144a19 commit 0f6a07f
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 8,195 deletions.
29 changes: 17 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var plugins = require('gulp-load-plugins')({
});

// Variables
var url = 'http://dagoth.bp.local/github/magmi-git/';
var url = 'localhost';
var magmi = 'magmi';

var paths = {
Expand All @@ -18,7 +18,7 @@ var paths = {
};

// BrowserSync task
gulp.task('browserSync', ['sass'], function() {
gulp.task('browserSync', ['sass:dev'], function() {
plugins.browserSync.init({
proxy: url,
reloadOnRestart: true,
Expand All @@ -35,21 +35,23 @@ gulp.task('browserSync', ['sass'], function() {
gulp.watch(magmi + '/**/*.php').on('change', plugins.browserSync.reload);
});

// Clean CSS task
gulp.task('cleancss', function () {
gulp.src(paths.css + '/**/*.css')
// Sass dev task
gulp.task('sass:dev', function() {
gulp.src(paths.sass + '/**/*.sass')
.pipe(plugins.plumber({
errorHandler: function (error) {
console.log(error.message);
this.emit('end');
}}))
.pipe(plugins.cleanCss())
.pipe(plugins.sass.sync().on('error', plugins.sass.logError))
.on('error', function(err) {})
.pipe(gulp.dest(paths.css));
.pipe(plugins.csscomb())
.pipe(gulp.dest(paths.css))
.pipe(plugins.browserSync.stream());
});

// Sass task
gulp.task('sass', function() {
// Sass prod task
gulp.task('sass:prod', function() {
gulp.src(paths.sass + '/**/*.sass')
.pipe(plugins.plumber({
errorHandler: function (error) {
Expand All @@ -59,9 +61,12 @@ gulp.task('sass', function() {
.pipe(plugins.sass.sync().on('error', plugins.sass.logError))
.on('error', function(err) {})
.pipe(plugins.csscomb())
.pipe(gulp.dest(paths.css))
.pipe(plugins.browserSync.stream());
.pipe(plugins.cleanCss())
.pipe(gulp.dest(paths.css));
});

// Dev task
gulp.task('dev', ['browserSync']);

// Default task
gulp.task('default', ['browserSync']);
gulp.task('default', ['sass:prod']);
2 changes: 0 additions & 2 deletions humans.txt

This file was deleted.

Loading

0 comments on commit 0f6a07f

Please sign in to comment.