ivanblazevic/ngx-unused-css

Add programmatic API

MCFreddie777 opened this issue · 2 comments

Right now, the package can be only used from the CLI with the config file.
It would be nice to use it from script, that would require typescript definitions, config from parameter and returning json of files and unused classes.

Working on it, should be available in couple of weeks

@MCFreddie777 could you tryout latest pre-release version where API was exposed and let me know if that works for you ?

import { NgxUnusedCSS } from 'ngx-unused-css';

const result = new NgxUnusedCSS(config).instance.run();