read0more / post-css-module
Get postCSS module classname from json
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/read0more/post-css-module
Requires
- ext-json: *
Requires (Dev)
- phpunit/phpunit: 9.5.x-dev
This package is auto-updated.
Last update: 2025-11-27 15:35:29 UTC
README
Get CSS classname transformed by postCSS-module using the json file that comes out when transforming postCSS-module.
use PostCSSModule\Transformer;
$cssPath = '/css';
$jsonPathFromPostCSSModule = '/json';
$transformer = new Transformer($cssPath, $jsonPathFromPostCSSModule);
// css filename in $cssPath
$cssName = 'button';
$transformer->getTransformedCssInfo($cssName);
// You can get transformed class name.
// e.g. $transformedClassNames['button'] you can get transformed class name "button"
$transformedClassNames = $transformedCssInfo->classNames;