Skip to content

Commit

Permalink
Update gulp tasks & v1.2.2
Browse files Browse the repository at this point in the history
The gulp default task used to finish minifying the css before it
compiled the sass, that is now fixed. Travis file also has updates, now
only running the default gulp task.
  • Loading branch information
lucasgruwez committed Mar 5, 2017
1 parent ae582ca commit 530a945
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 22 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Expand Up @@ -10,11 +10,9 @@ install:

before_script:
- npm install -g gulp

script:
- gulp sass:compile
- gulp css:minify


script:
- gulp

notifications:
email: false

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -40,7 +40,7 @@ or you can install the waffle grid system using a package manager like npm
```
$ npm install waffel-grid
```
If you want you can still download the waffle grid [here](https://github.com/lucasgruwez/waffle-grid/releases/download/v1.2.1/waffle-grid.min.css).
If you want you can still download the waffle grid [here](https://github.com/lucasgruwez/waffle-grid/releases/download/v1.2.2/waffle-grid.min.css).

## Docs

Expand Down Expand Up @@ -92,7 +92,7 @@ Please read [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for details on our code

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/lucasgruwez/waffle-grid/tags).
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/lucasgruwez/waffle-grid/tags).

## Authors

Expand Down
2 changes: 1 addition & 1 deletion dist/waffle-grid.css
@@ -1,5 +1,5 @@
/*!
* waffle-grid - v1.2.1 - (https://lucasgruwez.github.io/waffle-grid)
* waffle-grid - v1.2.2 - (https://lucasgruwez.github.io/waffle-grid)
* Copyright 2017 Lucas Gruwez.
* Licensed under MIT
* https://lucasgruwez.github.io/waffle-grid
Expand Down
2 changes: 1 addition & 1 deletion dist/waffle-grid.min.css

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

4 changes: 2 additions & 2 deletions docs/_config.yml
Expand Up @@ -10,8 +10,8 @@ url: lucasgruwez.github.io
baseurl: /waffle-grid

# Custom variables
version: v1.2.1
version: v1.2.2
cdn: https://unpkg.com/waffle-grid
repo: https://github.com/lucasgruwez/waffle-grid
download: https://github.com/lucasgruwez/waffle-grid/releases/download/v1.2.1/waffle-grid.min.css
download: https://github.com/lucasgruwez/waffle-grid/releases/download/v1.2.2/waffle-grid.min.css
docs: https://github.com/lucasgruwez/waffle-grid/wiki
13 changes: 6 additions & 7 deletions gulpfile.js
@@ -1,7 +1,9 @@
const gulp = require('gulp');
const sass = require('gulp-sass');
const gutil = require('gulp-util');
const rename = require('gulp-rename');
const cleanCSS = require('gulp-clean-css');
const runSequence = require('run-sequence');
const cssbeautify = require('gulp-cssbeautify');
const autoprefixer = require('gulp-autoprefixer');

Expand All @@ -11,11 +13,10 @@ gulp.task('sass:compile', function () {
.pipe(cleanCSS({
level: {
1: {
all: true // controls all properties
all: true
},
2: {
all: true,
mergeNonAdjacentByBody: true
}
}
})) // This moight seem counter intuitive at first, that we first uglify then beautify, but the uglification drastically reduces file size by merging col-1-of-4, col-2-of-8 and col-3-of-12 ito one same rule. The beautyfication makes the code readable. This reduces the non-minified file size by ~200 lines.
Expand All @@ -29,15 +30,13 @@ gulp.task('sass:compile', function () {
.pipe(gulp.dest('./dist'));
});

gulp.task('sass:watch', function () {
gulp.watch('./src/**/*.scss', ['sass']);
});

gulp.task('css:minify', function() {
return gulp.src('dist/waffle-grid.css')
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename('waffle-grid.min.css'))
.pipe(gulp.dest('dist'));
});

gulp.task('default', ['sass:compile', 'css:minify'])
gulp.task('default', function () {
runSequence('sass:compile', 'css:minify');
})
10 changes: 8 additions & 2 deletions package.json
@@ -1,8 +1,12 @@
{
"name": "waffle-grid",
"version": "1.2.1",
"version": "1.2.2",
"description": "An easy to use flexbox grid system",
"main": "dist/waffle-grid.min.css",
"repository": {
"type": "git",
"url": "https://github.com/lucasgruwez/waffle-grid"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -19,6 +23,8 @@
"gulp-clean-css": "^3.0.3",
"gulp-cssbeautify": "^0.1.3",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0"
"gulp-sass": "^3.1.0",
"gulp-util": "^3.0.8",
"run-sequence": "^1.2.2"
}
}
2 changes: 1 addition & 1 deletion src/waffle-grid.scss
@@ -1,5 +1,5 @@
/*!
* waffle-grid - v1.2.1 - (https://lucasgruwez.github.io/waffle-grid)
* waffle-grid - v1.2.2 - (https://lucasgruwez.github.io/waffle-grid)
* Copyright 2017 Lucas Gruwez.
* Licensed under MIT
* https://lucasgruwez.github.io/waffle-grid
Expand Down

0 comments on commit 530a945

Please sign in to comment.