add task gulp
This commit is contained in:
parent
c330c7f704
commit
4bccce7af6
7 changed files with 1930 additions and 37 deletions
1893
css/stylus/knacss-unminified.css
Normal file
1893
css/stylus/knacss-unminified.css
Normal file
File diff suppressed because it is too large
Load diff
1
css/stylus/knacss.css
Normal file
1
css/stylus/knacss.css
Normal file
File diff suppressed because one or more lines are too long
17
gulpfile.js
17
gulpfile.js
|
@ -8,6 +8,7 @@ var rename = require('gulp-rename');
|
||||||
var minifycss = require('gulp-minify-css');
|
var minifycss = require('gulp-minify-css');
|
||||||
// var sourcemaps = require('gulp-sourcemaps');
|
// var sourcemaps = require('gulp-sourcemaps');
|
||||||
var autoprefixer = require('gulp-autoprefixer');
|
var autoprefixer = require('gulp-autoprefixer');
|
||||||
|
var stylus = require('gulp-stylus');
|
||||||
|
|
||||||
|
|
||||||
// tâche CSS = compile vers knacss.css et knacss-unminified.css
|
// tâche CSS = compile vers knacss.css et knacss-unminified.css
|
||||||
|
@ -36,6 +37,22 @@ gulp.task('grillade', function() {
|
||||||
.pipe(gulp.dest('./css/'));
|
.pipe(gulp.dest('./css/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('styluscss', function () {
|
||||||
|
return gulp.src('./styl/knacss.styl')
|
||||||
|
.pipe(stylus())
|
||||||
|
.pipe(autoprefixer())
|
||||||
|
.pipe(rename('knacss-unminified.css'))
|
||||||
|
.pipe(gulp.dest('./css/stylus/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styluscssmin', function () {
|
||||||
|
return gulp.src('./styl/knacss.styl')
|
||||||
|
.pipe(stylus({compress: true}))
|
||||||
|
.pipe(gulp.dest('./css/stylus/'))
|
||||||
|
.pipe(minifycss())
|
||||||
|
.pipe(gulp.dest('./css/stylus/'));
|
||||||
|
});
|
||||||
|
|
||||||
// Watcher
|
// Watcher
|
||||||
gulp.task('watch', function() {
|
gulp.task('watch', function() {
|
||||||
gulp.watch(['./sass/*.scss'], ['css']);
|
gulp.watch(['./sass/*.scss'], ['css']);
|
||||||
|
|
|
@ -29,12 +29,13 @@
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "latest",
|
"gulp": "latest",
|
||||||
"gulp-rename": "latest",
|
"gulp-autoprefixer": "latest",
|
||||||
"gulp-sass": "latest",
|
|
||||||
"gulp-concat": "latest",
|
"gulp-concat": "latest",
|
||||||
"gulp-minify-css": "latest",
|
"gulp-minify-css": "latest",
|
||||||
"gulp-autoprefixer": "latest",
|
"gulp-rename": "latest",
|
||||||
"gulp-sourcemaps": "latest"
|
"gulp-sass": "latest",
|
||||||
|
"gulp-sourcemaps": "latest",
|
||||||
|
"gulp-stylus": "^2.6.0"
|
||||||
},
|
},
|
||||||
"engines": {}
|
"engines": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,22 +30,3 @@ respond-to(value)
|
||||||
@media screen and string
|
@media screen and string
|
||||||
{block}
|
{block}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
displayFlex()
|
|
||||||
display: -webkit-box
|
|
||||||
display: -ms-flexbox
|
|
||||||
display: flex
|
|
||||||
|
|
||||||
box-orient()
|
|
||||||
-webkit-box-orient arguments
|
|
||||||
|
|
||||||
box-direction()
|
|
||||||
-webkit-box-direction arguments
|
|
||||||
|
|
||||||
flex-direction()
|
|
||||||
-ms-flex-direction arguments
|
|
||||||
flex-direction arguments
|
|
||||||
|
|
||||||
flex-wrap()
|
|
||||||
-ms-flex-wrap arguments
|
|
||||||
flex-wrap arguments
|
|
||||||
|
|
|
@ -41,9 +41,9 @@ grid(grid-number = 1, own-gutter = 0)
|
||||||
@media (min-width: tiny + 1)
|
@media (min-width: tiny + 1)
|
||||||
.grid
|
.grid
|
||||||
.grid--reverse
|
.grid--reverse
|
||||||
displayFlex()
|
flexbox(flex)
|
||||||
& > *
|
& > *
|
||||||
flex 1 1 0%
|
flex(1 1 0%)
|
||||||
box-sizing border-box
|
box-sizing border-box
|
||||||
min-width 0
|
min-width 0
|
||||||
min-height 0
|
min-height 0
|
||||||
|
@ -55,7 +55,7 @@ grid(grid-number = 1, own-gutter = 0)
|
||||||
@media (min-width: tiny + 1)
|
@media (min-width: tiny + 1)
|
||||||
for i in 2..12
|
for i in 2..12
|
||||||
grid-selector = 'grid-%s' % i
|
grid-selector = 'grid-%s' % i
|
||||||
[class*={grid-selector}] > *
|
[class*=\"{grid-selector}\"]
|
||||||
grid(i, 0)
|
grid(i, 0)
|
||||||
|
|
||||||
.push
|
.push
|
||||||
|
@ -81,17 +81,17 @@ grid(grid-number = 1, own-gutter = 0)
|
||||||
flowToDivid = {'full': 1, 'one-half': 2, 'one-third': 3, 'one-quarter': 4, 'one-fifth': 5, 'one-sixth': 6, 'two-thirds': 3 * 2, 'three-quarters': 4 * 3, 'five-sixths': 6 * 5}
|
flowToDivid = {'full': 1, 'one-half': 2, 'one-third': 3, 'one-quarter': 4, 'one-fifth': 5, 'one-sixth': 6, 'two-thirds': 3 * 2, 'three-quarters': 4 * 3, 'five-sixths': 6 * 5}
|
||||||
for flow, divider in flowToDivid
|
for flow, divider in flowToDivid
|
||||||
.{flow}
|
.{flow}
|
||||||
flex 0 0 auto
|
flex(0 0 auto)
|
||||||
width 'calc(100% / %s - %s)' % (divider iefix)
|
width 'calc(100% / %s - %s)' % (divider iefix)
|
||||||
for key, size in grid-gutters
|
for key, size in grid-gutters
|
||||||
.has-gutter{key} .{flow}
|
.has-gutter{key} .{flow}
|
||||||
width 'calc(100% / %s - %s - %s)' % (divider size iefix)
|
width 'calc(100% / %s - %s - %s)' % (divider size iefix)
|
||||||
|
|
||||||
/* Responsive Small Breakpoint */
|
/* Responsive Small Breakpoint */
|
||||||
@media (min-width: tiny + 1) and (max-width: small)
|
@media (min-width: tiny + 1) and (max-width: medium)
|
||||||
for i in 1..4
|
for i in 1..4
|
||||||
index = '-small-%s' % i
|
index = '-small-%s' % i
|
||||||
[class*={index}]
|
[class*=\"{index}\"]
|
||||||
& > *
|
& > *
|
||||||
width: 'calc(100% / %s - %s)' % (i iefix)
|
width: 'calc(100% / %s - %s)' % (i iefix)
|
||||||
for key, size in grid-gutters
|
for key, size in grid-gutters
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* ==Global Layout */
|
/* ==Global Layout */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
|
@import '../vendor/flexbox-stylus/stylus/flexbox.styl'
|
||||||
/* module, gains superpower "BFC" Block Formating Context */
|
/* module, gains superpower "BFC" Block Formating Context */
|
||||||
.mod
|
.mod
|
||||||
.bfc
|
.bfc
|
||||||
|
@ -66,16 +66,16 @@ img.{kna-namespace}fr
|
||||||
http://www.alsacreations.com/tuto/lire/1493-css3-flexbox-layout-module.html
|
http://www.alsacreations.com/tuto/lire/1493-css3-flexbox-layout-module.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[class*="{kna-namespace}flex-container"]
|
[class*={kna-namespace}"flex-container"]
|
||||||
.{kna-namespace}flex-container
|
.{kna-namespace}flex-container
|
||||||
display flex
|
flexbox(flex)
|
||||||
flex-wrap wrap
|
flex-wrap(wrap)
|
||||||
|
|
||||||
.{kna-namespace}flex-container-h
|
.{kna-namespace}flex-container-h
|
||||||
flex-direction row
|
flex-direction(row)
|
||||||
|
|
||||||
.{kna-namespace}flex-container-v
|
.{kna-namespace}flex-container-v
|
||||||
flex-direction column
|
flex-direction(column)
|
||||||
|
|
||||||
.{kna-namespace}flex-item-fluid
|
.{kna-namespace}flex-item-fluid
|
||||||
flex 1
|
flex 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue