You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-2
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,12 @@ you want to convert all SVG file in your current folder to TypeScript constants.
80
80
### Configuration in package.json or .rc file
81
81
82
82
When you start using `svg-to-ts` in bigger projects, configuration may get more sophisticated. At this point command line
83
-
arguments are hard to read. Therefore `svg-to-ts` allows you to configure it either over package.json or over a `.svg-to-tsrc` file.
83
+
arguments are hard to read. Therefore `svg-to-ts` allows you to configure it either over `package.json` or over a `.svg-to-tsrc` file.
84
+
85
+
Those files can be written in `json`, `yaml`, `yml`, `js` (CommonJS module). By default `svg-to-ts` will search up
86
+
the directory tree for a `svg-to-ts` propert in the `package.json`, a `.svg-to-tsrc` file. However, if you are working
87
+
in a monorepo or want to have multiple configs, you can use the `--config` property to specify a path your configuration.
88
+
For example `svg-to-ts --config ./myconfig.json`.
84
89
85
90
#### Configure svg-to-ts over package.json
86
91
@@ -275,7 +280,7 @@ supports code splitting which is especially usefull in scenarios where you are u
275
280
[Here's a step by step guide on how to create an icon library that is optimized for tree shaking](https://medium.com/angular-in-depth/how-to-create-a-fully-tree-shakable-icon-library-in-angular-c5488cf9cd76)
276
281
277
282

278
-
Often, having the SVGs in a single file is enough. However if you are in a more complex environment with bigger business
283
+
Often, having the SVGs in a single file is enough. However, if you are in a more complex environment with bigger business
279
284
applications, you may want to make the icons even more tree shakable.
280
285
281
286
In Angular, for example, having all icons in a single file shakes out the icons that are not used. However, icons always
0 commit comments