Commit deec1bd3 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] add very basic autoprefixer support

parent d7f65ccf
...@@ -4,6 +4,7 @@ const fs = require('fs'); ...@@ -4,6 +4,7 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const globby = require('globby'); const globby = require('globby');
const postcss = require('postcss'); const postcss = require('postcss');
const autoprefixer = require('autoprefixer');
const util = require('util'); const util = require('util');
const chalk = require('chalk'); const chalk = require('chalk');
...@@ -53,7 +54,9 @@ module.exports = class Css extends Task { ...@@ -53,7 +54,9 @@ module.exports = class Css extends Task {
this._logger.error(_error); this._logger.error(_error);
} }
fs.writeFile(_output, result.css, _error => { let css = await postcss([autoprefixer]).process(result.css);
fs.writeFile(_output, css, _error => {
if (_error) { if (_error) {
return this._logger.error(_error); return this._logger.error(_error);
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"node": "~10.9.0" "node": "~10.9.0"
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^9.1.3",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"globby": "^8.0.1", "globby": "^8.0.1",
"log-symbols": "^2.2.0", "log-symbols": "^2.2.0",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment