Comparing version 1.5.2 to 1.6.0
var gulp = require('gulp'); | ||
var $ = require('gulp-load-plugins')(); | ||
var autoprefixer = require('autoprefixer'); | ||
var scss = require('postcss-scss'); | ||
var stylelint = require('stylelint'); | ||
var browserSync = require('browser-sync').create(); | ||
@@ -8,3 +10,2 @@ var config = { | ||
'dest': 'dist/', | ||
'proxy': false, | ||
'sourcemaps': false, | ||
@@ -22,3 +23,3 @@ 'browsers': [ | ||
gulp.task('html', function() { | ||
return gulp.src(config.src + '*.html') | ||
return gulp.src('*.html') | ||
.pipe(browserSync.stream()); | ||
@@ -43,6 +44,6 @@ }); | ||
])) | ||
.pipe($.if(config.sourcemaps, $.sourcemaps.write())) | ||
.pipe(gulp.dest(config.dest + 'css')) | ||
.pipe(browserSync.stream()) | ||
.pipe($.cleanCss({compatibility: 'ie8'})) | ||
.pipe($.if(config.sourcemaps, $.sourcemaps.write())) | ||
.pipe($.rename({suffix: '.min'})) | ||
@@ -53,6 +54,15 @@ .pipe(gulp.dest(config.dest + 'css')) | ||
// Lint stylesheets | ||
gulp.task('stylelint', function() { | ||
return gulp.src(config.src + 'scss/**/*.scss') | ||
.pipe($.postcss([ | ||
stylelint() | ||
], { | ||
syntax: scss | ||
})); | ||
}); | ||
// Compile javascript | ||
gulp.task('scripts', function() { | ||
return gulp.src(config.src + 'js/*.js') | ||
.pipe($.if(config.sourcemaps, $.sourcemaps.init())) | ||
.pipe($.include().on('error', function(error) { | ||
@@ -62,2 +72,5 @@ $.util.log($.util.colors.red(error.message)); | ||
})) | ||
.pipe(gulp.dest(config.dest + 'js')) | ||
.pipe(browserSync.stream()) | ||
.pipe($.if(config.sourcemaps, $.sourcemaps.init())) | ||
.pipe($.uglify().on('error', function(error) { | ||
@@ -86,18 +99,11 @@ $.util.log($.util.colors.red(error.message)); | ||
gulp.task('serve', ['build'], function() { | ||
var browserSyncConfig = { | ||
browserSync.init({ | ||
server: true, | ||
notify: false, | ||
snippetOptions: { | ||
rule: { | ||
match: /<\/head>/i, | ||
match: /<\/body>/i | ||
} | ||
} | ||
}; | ||
if(config.proxy) { | ||
browserSyncConfig.proxy = config.proxy; | ||
} else { | ||
browserSyncConfig.server = '.'; | ||
} | ||
browserSync.init(browserSyncConfig); | ||
}); | ||
}); | ||
@@ -107,6 +113,6 @@ | ||
gulp.task('watch', function() { | ||
gulp.watch([config.src + '*.html'], ['html']); | ||
gulp.watch([config.src + 'scss/**/*.scss'], ['styles']); | ||
gulp.watch([config.src + 'js/*.js'], ['scripts']); | ||
gulp.watch([config.src + 'img/**/*.{gif,jpg,png,svg}'], ['images']); | ||
gulp.watch('*.html', ['html']); | ||
gulp.watch(config.src + 'scss/**/*.scss', ['styles']); | ||
gulp.watch(config.src + 'js/*.js', ['scripts']); | ||
gulp.watch(config.src + 'img/**/*.{gif,jpg,png,svg}', ['images']); | ||
}); | ||
@@ -113,0 +119,0 @@ |
{ | ||
"name": "baseguide", | ||
"description": "Lightweight and robust CSS framework for prototyping and production code.", | ||
"version": "1.5.2", | ||
"version": "1.6.0", | ||
"keywords": [ | ||
@@ -19,4 +19,4 @@ "css", | ||
"devDependencies": { | ||
"autoprefixer": "^6.4.0", | ||
"browser-sync": "^2.14.0", | ||
"autoprefixer": "^6.4.1", | ||
"browser-sync": "^2.14.3", | ||
"gulp": "^3.9.1", | ||
@@ -26,3 +26,3 @@ "gulp-cache": "^0.4.5", | ||
"gulp-if": "^2.0.1", | ||
"gulp-imagemin": "^3.0.2", | ||
"gulp-imagemin": "^3.0.3", | ||
"gulp-include": "^2.3.1", | ||
@@ -35,4 +35,7 @@ "gulp-load-plugins": "^1.2.4", | ||
"gulp-uglify": "^2.0.0", | ||
"gulp-util": "^3.0.7" | ||
"gulp-util": "^3.0.7", | ||
"postcss-scss": "^0.2.1", | ||
"stylelint": "^7.2.0", | ||
"stylelint-config-standard": "^13.0.0" | ||
} | ||
} |
@@ -46,3 +46,3 @@ # [Baseguide](http://basegui.de) | ||
```sh | ||
npm install && gulp serve | ||
npm install && gulp | ||
``` | ||
@@ -123,2 +123,14 @@ | ||
Accessing gutter values is easy using the ```get-gutter``` function. The smallest gutter gets returned by default. | ||
```scss | ||
.col { | ||
margin-bottom: get-gutter(); | ||
@include mq(md) { | ||
margin-bottom: get-gutter(md); | ||
} | ||
} | ||
``` | ||
### Semantic / hybrid grid | ||
@@ -125,0 +137,0 @@ The grid mixins can be used to create custom containers, rows and columns. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
197830
3659
267
18