1

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?

blond1995
  • 27
  • 4

1 Answers1

1

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.

Arnaud Rinquin
  • 4,296
  • 1
  • 30
  • 51