From 96b6521da8b8fb0349a853e432be4e4e272da4a2 Mon Sep 17 00:00:00 2001 From: Kim Hallberg Date: Tue, 8 Dec 2020 16:56:45 +0100 Subject: [PATCH] Error when using unsupported PostCSS version (fix #361) (#362) --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 0bab158..ce117bb 100644 --- a/index.js +++ b/index.js @@ -56,6 +56,11 @@ if (argv.watch) { process.stdin.resume() } +/* istanbul ignore next */ +if (parseInt(postcss().version) < 8) { + error('Please install PostCSS 8 or above') +} + Promise.resolve() .then(() => { if (argv.watch && !(argv.output || argv.replace || argv.dir)) {