Are there ways to perform postCSS processing withouth gulp or grunt. Only with help of maven?

429 views Asked by At

I want to perform postprocessing in my project with help of postCSS. As I'm new in frontend I read only ways to perform it by frontend build system (grunt or gulp). But maybe the ways to postpocess only with maven?

1

There are 1 answers

0
Arnaud Rinquin On BEST ANSWER

You can use postcss-cli to run it through the command line.

The command usage is pretty straight-forward.

 postcss [options] [-o output-file|-d output-directory] [input-file]

Also, if you are using npm along with a package.json file, I would advise you to add a run-script:

{
  "name": "my-app",
  "script": {
     "css": "postcss your options -go here"
  },
  "dependencies": {
     "postcss":"^4.1.13"
  }
}

So you can simply run npm run css from maven / CLI without having to worry about prefixing your command node_modules/bin and having your options in maven.