Click here to Skip to main content
15,888,062 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am asking really a couple general questions for gulp-postcss experts. I am trying to get intellisense for my classes when i import a partial stylsheet containing other classes and am sure postcss somehow does this in sass but cant get it to work. So am wondering what is fs.readFyleSync. I know it is node.js and am wondering is this what will provide me intellisense using @extend. Or is it Postcss-partial-import plugin? Or is it just an option setting in precss plugin or a setting or expression in the watch task? I know how to use gulp and postcss somewhat. I don't understand the inner workings of either so i am not sure what to do and have to move on from just trying anything. Can anyone tell me if any of these will provide what i want or knows something else. Here is the code i have developed so far. System- Win10, VS 2015 Ent, MVC6 App

JavaScript
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var precss = require('precss');
var scss = require('postcss-scss');
var extend = require('postcss-extend');
var fs = require("fs");// not used. just in there for a possible solution

gulp.task('default', function () {    
// place code for your default task here
});

var paths = {
webroot: "./wwwroot/"      
};

//var paths = {   
//    src: [(paths.webroot + 'css/**/*.scss')],
//    dest: [paths.webroot + 'css']
//};

gulp.task('css', function () {
var processors = [extend, precss];
return gulp.src(paths.webroot + 'css/**/*.scss')
  .pipe(postcss(processors, { syntax: scss }))
  .pipe(gulp.dest(paths.webroot + 'dest/'));
});

gulp.task('css:watch', function () {
gulp.watch(paths.webroot + 'css/**/*.scss', ['css']);
});


What I have tried:

have tried using postcss-extend, web compiler, postcss-import and a few other plugins.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900