diff --git a/core/tasks/postcss.js b/core/tasks/postcss.js index bf64c8c..cf2f22d 100644 --- a/core/tasks/postcss.js +++ b/core/tasks/postcss.js @@ -2,20 +2,18 @@ const gulp = require('gulp'); const postcss = require('gulp-postcss'); // Plugins -const autoprefixer = require('autoprefixer'); -const atImport = require("postcss-import"); const paths = require('../paths'); -const config = require('../../bedrock.config'); +const bedrockConfig = require('../../bedrock.config'); +const postCSSPluginConfig = require('../../postcss.config'); + const { content } = require('../paths'); module.exports = function () { - var plugins = [ atImport, autoprefixer ]; - - if (config.cssCompiler == 'postcss') { + if (bedrockConfig.cssCompiler == 'postcss') { return gulp.src(paths.content.postcss.allMainFiles) - .pipe(postcss(plugins)) + .pipe(postcss(postCSSPluginConfig)) .on('error', (err) => console.error(err)) .pipe(gulp.dest(paths.compiled.css)); } else { diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..e8f1d36 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,4 @@ +const atImport = require('postcss-import'); +const autoprefixer = require('autoprefixer'); + +module.exports = [atImport, autoprefixer]; \ No newline at end of file