Skip to content

Commit

Permalink
New release:
Browse files Browse the repository at this point in the history
 - Added autoprefixer to the build system
 - Added a mixin for media queries (respond-to, needs documentation)
 - Cleaned files
 - Fixed Gulpfile
 - Updated gulp and plugins
 - Added minified version of compiled css
 - Moved sourcemaps to their own folder
  • Loading branch information
ramono committed Apr 9, 2016
1 parent 4e162cc commit 95bdd59
Show file tree
Hide file tree
Showing 19 changed files with 757 additions and 471 deletions.
56 changes: 34 additions & 22 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
var gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
sass = require('gulp-sass'),
minify = require('gulp-minify-css'),
cssnano = require('gulp-cssnano'),
watch = require('gulp-watch'),
autoprefixer = require('gulp-autoprefixer'),
rename = require('gulp-rename'),
scsslint = require('gulp-scss-lint');

// Modify these variables according to your project
Expand All @@ -13,40 +15,50 @@ var config = {

gulp.task('default', ['style']);


// Compile Sass files
gulp.task('style', function() {
gulp.task('style', function () {
'use strict';
gulp.src(config.scssDir + '/*.scss')
.pipe(sass())
.pipe(minify())
.pipe(gulp.dest(config.cssDir));
.pipe(sass())
.pipe(autoprefixer({browsers: ['last 2 versions', 'ie >= 9']}))
.pipe(cssnano())
.pipe(gulp.dest(config.cssDir));
});
gulp.task('style-dev', function() {
gulp.task('style-dev', function () {
'use strict';
gulp.src(config.scssDir + '/*.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write())
.pipe(gulp.dest(config.cssDir));
.pipe(sourcemaps.init())
.pipe(sass({outputStyle: "expanded"}))
.pipe(autoprefixer({browsers: ['last 2 versions', 'ie >= 9']}))
.pipe(sourcemaps.write('maps'))
.pipe(gulp.dest(config.cssDir));
});


gulp.task('lint', function() {
return gulp.src(config.scssDir + '/*.scss')
.pipe(scsslint({
'config': 'lint.yml',
}));
gulp.task('prod', ['style-dev'], function () {
return gulp.src(config.cssDir + '/style.css')
.pipe(cssnano())
.pipe(rename('style.min.css'))
.pipe(gulp.dest(config.cssDir));
});

gulp.task('lint', function () {
'use strict';
return gulp.src(config.scssDir + '/*.scss')
.pipe(scsslint({
config: 'lint.yml'
}));
});

// Production
gulp.task('build', function() {
gulp.start('style');
gulp.task('build', function () {
'use strict';
gulp.start('prod');
});


// Watch for changes
gulp.task('watch', function() {
watch(config.scssDir + '/**/*.scss', function() {
gulp.task('watch', function () {
'use strict';
watch(config.scssDir + '/**/*.scss', function () {
gulp.start('style-dev');
});
});
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hoisin.scss",
"version": "0.9.12",
"version": "0.9.13",
"description": "A simple responsive mini framework to kick start your project.",
"main": ["scss/styles.scss", "scss/responsive.scss"],
"keywords": [
Expand Down
131 changes: 90 additions & 41 deletions css/ie.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions css/ie.css.map

This file was deleted.

1 change: 1 addition & 0 deletions css/maps/ie.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions css/maps/style.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit 95bdd59

Please sign in to comment.