Closed bob2517 closed 9 months ago
If anyone want to have a crack at this then go for it. This is one of the few issues that people can do without knowing about the core internals.
Test config would be the full one from the activecss.org website which should cover a lot of scenarios: https://activecss.org/activecss-config/all-config.txt
You need to understand how the config works though. It doesn't parse with a CSS minifier. It's got the target selector, which is a new concept. And there's loads of other differences too, like inline JS and inline HTML.
It's mainly just removing the unnecessary whitespace. That would be a start and enough to release it as a minifier. Use whatever best practices make you feel warm and fuzzy.
Let me know if you are doing it and I'll assign you to the issue. It will need to get a separate npm package so it integrates with Node and I'll put up links to your repo on the docs website and on the readme of this repo. You'll also be on the credit page of the main website if it does the job :)
Do it how you want but please do a grunt minifier or some sort of command line tool so I can use it on my stuff :)
If anyone has a question on config rules, regex madness or anything, let me know via this issue or directly via support from the docs website.
This isn't a good first issue, unless the person is familiar with Active CSS. Removing tag.
Gonna do this for 2.5.0 myself as a grunt plugin. Not done a grunt plugin before - should be fun.
Starting this now. Need it for the offline docs site to keep the ACSS file size small. Everything's going into one file so the browsing experience can stay awesome.
Not going to bother using source maps - no point at the moment as it won't be compatible with any viewer anyway. May as well get the extension done first, which displays unminified config file lines. The core already records line numbers for use in the extension anyway. Later on work out a sourcemap handling if and when the need arises.
The starting grunt plugin template is in place with working tests. Will be back on it at the weekend to wrap up the minifier. It's not going to do much.
Don't technically need this now as I need a PHP minifier, not a grunt one. So pending work on this until later on. More than happy to revisit this though if anyone needs it urgently.
Closing this for now as it hasn't come up as a necessity.
There isn't a minifier for Active CSS config yet, so this needs writing.