Unable to use cssnext as a processor with gulp-postcss
See original GitHub issueI’d like to use the cssnext plugin pack with gulp-postcss, as my first processor to be followed by a set of other cherry picked postcss plugins. The trouble is that I can’t figure out how to get cssnext working with gulp-postcss. In the following code snippet I think I’m using cssnext()
wrong within the processors
array, but everything I’ve tried to correct it fails.
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var cssnext = require('cssnext');
config = {
cssDistPath: './dist/css',
cssSrcGlob: './src/css/**/*.css'
};
gulp.task('css', function () {
var processors = [
cssnext({
features: {
calc: {
preserve: true
}
}
})
];
return gulp.src(config.cssSrcGlob)
.pipe(postcss(processors))
.pipe(gulp.dest(config.cssDistPath));
});
Do you have any suggestions on how to get this working, or a better configuration?
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (14 by maintainers)
Top Results From Across the Web
postcss/postcss - Gitter
hey, I'm trying to write a custom plugin to rename any class, but I can't see any changes when I'm looking at the...
Read more >gulp: PostCSS failing - postcss version higher than version of ...
I found the answer: According to the website of cssnext, the package cssnext (which I used) is dead. The new package to use...
Read more >gulp-postcss - npm
Start using gulp-postcss in your project by running `npm i ... gulp.task('css', function () { var plugins = [ cssnext({browsers: ['last 1 ...
Read more >How to set up a postcss pipeline with variable sharing in gulp
The build task will look for a main.css file in the src directory, and will process that file using the processors specified (in...
Read more >PostCSS: Sass's New Play Date - Toptal
With that being said, this does not mean that PostCSS and other CSS processors can't work together. As a matter of fact, if...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I will take a look at this tonight
@TrySound thank you