eduarddotgg / posthtml-modular-css

9 stars 1 forks source link

Better integration with css pre/postprocessors #3

Open eduarddotgg opened 8 years ago

eduarddotgg commented 8 years ago

@voischev how do you think how can we integrate it with css pre/postprocessors? i mean for now it just concatenates css files but actually it can be any file scss/sass/less/stylus/postcss. The problem is that if we will concatenate scss/sass/less/stylus/postcss it will require additional step/task for compiling browser supported css. i would like to make it possible with one gulp task so we compile html and concatenate imported scss/sass/less/stylus/postcss and than with pipe or something like that compile css.

voischev commented 8 years ago

@admdh why not?

cssFile = preprocessorRender(cssFile);
concat(cssFile, options.outputCSS, function (error) {
            console.log('CSS file created');
        });
eduarddotgg commented 8 years ago

@voischev could you please help me with that a little bit more?

voischev commented 8 years ago

maybe need that

gulp.task('css', function () {
    return gulp.src('./webroot/assets/styl/*.styl')
        .pipe(require('gulp-stylus')())
        .pipe(gulp.dest('./webroot/assets/css/'))
});

and in template

css(src="/assets/css/button.css")
me-awesome commented 3 years ago

This is badly needed with webpack can you integrate it its a good idea