{"size": 914, "ext": "js", "max_stars_repo_path": "gulpfile.js/dev/styles.js", "max_stars_repo_name": "kronik3r/prototyper-kit", "max_stars_repo_stars_event_min_datetime": "2015-11-29T16:37:53.000Z", "max_stars_repo_stars_event_max_datetime": "2015-11-29T16:37:53.000Z", "max_issues_repo_path": "gulpfile.js/dev/styles.js", "max_issues_repo_name": "kronik3r/prototyper-kit", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "gulpfile.js/dev/styles.js", "max_forks_repo_name": "kronik3r/prototyper-kit", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.5172413793, "max_line_length": 63, "alphanum_fraction": 0.6258205689}
var config = require('../config');
var gulp = require('gulp');
var browserSync = require('browser-sync');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var plumber = require('gulp-plumber');
var autoprefixer = require('gulp-autoprefixer');
var path = require('path');

var paths = {
    src: path.join(config.root.src, config.tasks.styles.src),
    dest: path.join(config.root.dest, config.tasks.styles.dest)
}

gulp.task('styles', function(){
    return gulp.src(paths.src)
        .pipe(plumber())
        .pipe(sourcemaps.init())
        .pipe(sass.sync({
            outputStyle: 'expanded',
            precision: 10,
            includePaths: ['.']
        }).on('error', sass.logError))
        .pipe(autoprefixer(config.tasks.styles.autoprefixer))
        .pipe(sourcemaps.write())
        .pipe(gulp.dest(paths.dest))
        .pipe(browserSync.reload({stream: true}));
});
