Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add programmatic API #38

Open
MCFreddie777 opened this issue Jul 16, 2021 · 2 comments · May be fixed by #62
Open

Add programmatic API #38

MCFreddie777 opened this issue Jul 16, 2021 · 2 comments · May be fixed by #62
Labels
enhancement New feature or request

Comments

@MCFreddie777
Copy link
Collaborator

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.

@ivanblazevic
Copy link
Owner

Working on it, should be available in couple of weeks

@ivanblazevic ivanblazevic added the enhancement New feature or request label Jan 16, 2022
@ivanblazevic ivanblazevic linked a pull request Jan 18, 2022 that will close this issue
@ivanblazevic
Copy link
Owner

@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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants