3
After a lot of fighting, I started making the page of my portfolio. I took the opportunity to use a few things I was learning, among them the Gulp and Stylus. For the construction of CSS I am using the methodology (I understand as architecture) ITCSS. However, at the time of executing the Gulp task I am getting some errors.
I have already updated the version of Gulp and Node.
My task at the Gulp
//Importa os módulos necessários para o Gulp, inclusive ele mesmo
var gulp = require( 'gulp' );
var concatCss = require('gulp-concat-css');
var stylus = require('gulp-stylus');
var minifyCss = require('gulp-minify-css');
//Tarefa para compilar, concatenar e comprimir o css
gulp.task('css', function() {
return gulp.src('src/styl/*.styl')
.pipe(stylus())
.pipe(concatCss("style.css"))
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(gulp.dest('dist/css/'));
});
In my base.styl
I have the code below:
body
background-color: red
In my settings.styl
:
/*====================
*=====Variáveis
*====================/
//Cores
$color-white: #fff
//Media Queries
media_queries = {
thin-mobile: "only screen and (min-width: 320px)",
medium-mobile: "only screen and (min-width: 480px)",
large-mobile: "only screen and (min-width: 600px)",
tablet: "only screen and (min-width: 768px)",
deskto: "only screen and (min-width: 900px)"
}
It is not parsing my Stylus code. When executing the task I get:
Potentially unhandled rejection[2] Error: No writecb in Transform Class
If I only have the file base.styl
he parses normally. But then with the settings.styl
in the middle already gives the error.