Skip to content

Commit

Permalink
Make things configurable; so you can add Tailwind if you really feel …
Browse files Browse the repository at this point in the history
…the need, in a config file that it outside of Bedrock core
  • Loading branch information
Wolfr committed Jun 17, 2021
1 parent f795df9 commit 92b5e73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 5 additions & 7 deletions core/tasks/postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const atImport = require('postcss-import');
const autoprefixer = require('autoprefixer');

module.exports = [atImport, autoprefixer];

0 comments on commit 92b5e73

Please sign in to comment.