-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow loading config from file in API #1327
Labels
Comments
Yeah, I'm thinking about this. Though it will be only |
TrySound
added a commit
that referenced
this issue
Feb 16, 2021
Ref #1327 Config file now can only be js. `svgo.config.js` is searched by default. Otherwise any js module specified in `--config` cli flag. Config loader is exposed in entry point as `loadConfig(configFile, cwd)`.
TrySound
added a commit
that referenced
this issue
Feb 16, 2021
Ref #1327 Config file now can only be js. `svgo.config.js` is searched by default. Otherwise any js module specified in `--config` cli flag. Config loader is exposed in entry point as `loadConfig(configFile, cwd)`.
TrySound
added a commit
that referenced
this issue
Feb 16, 2021
Ref #1327 Config file now can only be js. `svgo.config.js` is searched by default. Otherwise any js module specified in `--config` cli flag. Config loader is exposed in entry point as `loadConfig(configFile, cwd)`.
Added loadConfig utility in v2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Being able to share the same config file between the CLI tool and API would simplify things a little bit. I only had limited time to look through the source, but it looks like the code for the
--config
option inlib/svgo/coa.js
could be moved to a separate function and exposed to the API.Big thanks for all your work, btw!
The text was updated successfully, but these errors were encountered: