posthtml / htmlnano

Modular HTML minifier, built on top of the PostHTML

Home Page:https://htmlnano.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add .htmlnanorc support

maltsev opened this issue · comments

For storing configuration.

commented

Instead of .htmlnanorc, I prefer the following formats:

  • .htmlnanorc.cjs
  • .htmlnanorc.js
  • .htmlnanorc.yaml
  • .htmlnanorc.yml
  • .htmlnanorc.jsonc
  • .htmlnanorc.json

I'd like to port the feature from mochajs:

https://github.com/mochajs/mocha/blob/1a4646dd2f7b35010c2488edcb2d5f4cfb2f14a8/lib/cli/config.js

You can use CosmicConfig as a popular approach for pulling config from a file which supports various formats.

Implemented in 2c03b10 (forgot to add the issue number there).