Skip to content

Commit

Permalink
docs: update blobs, and svgo usage instructions (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljaltamirano committed Jan 1, 2022
1 parent 17507b4 commit 0927303
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/webpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ If you prefer named export in any case, you may set the `exportType` option to `

### Use your own Babel configuration

By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configuration](https://github.com/gregberge/svgr/blob/master/packages/webpack/src/index.js). In some case you may want to apply a custom one (if you are using Preact for an example). You can turn off Babel transformation by specifying `babel: false` in options.
By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configuration](https://github.com/gregberge/svgr/blob/main/packages/webpack/src/index.ts). In some case you may want to apply a custom one (if you are using Preact for an example). You can turn off Babel transformation by specifying `babel: false` in options.

```js
// Example using preact
Expand Down
4 changes: 2 additions & 2 deletions website/pages/docs/configuration-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ expandProps: false

## SVGO

The recommended way to configure SVGO for SVGR is to use [`.svgo.yml`](https://github.com/svg/svgo/blob/master/.svgo.yml). [Several formats are supported](./packages/core/src/plugins/svgo.js) and it is relative to the transformed SVG file.
The recommended way to configure SVGO for SVGR is to use [`svgo.config.js`](https://github.com/svg/svgo/blob/main/README.md#configuration).

Even if it is not recommended, you can also use `svgoConfig` option to specify your SVGO configuration. `svgoConfig` has precedence on `.svgo.yml`.
Even if it is not recommended, you can also use `svgoConfig` option to specify your SVGO configuration. `svgoConfig` has precedence on `svgo.config.js`.

## Prettier

Expand Down
6 changes: 3 additions & 3 deletions website/pages/docs/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ Add title tag via title property. If titleProp is set to true and no title is pr

## Template

Specify a template file (CLI) or a template function (API) to use. For an example of template, see [the default one](https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-transform-svg-component/src/index.js).
Specify a template file (CLI) or a template function (API) to use. For an example of template, see [the default one](https://github.com/gregberge/svgr/blob/main/packages/babel-plugin-transform-svg-component/src/defaultTemplate.ts).

| Default | CLI Override | API Override |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ |
| [`basic template`](https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-transform-svg-component/src/index.js) | `--template` | `template: <func>` |
| [`basic template`](https://github.com/gregberge/svgr/blob/main/packages/babel-plugin-transform-svg-component/src/defaultTemplate.ts) | `--template` | `template: <func>` |

## Output Directory

Expand All @@ -200,7 +200,7 @@ Specify a template function (API) to change default index.js output (when --out-

| Default | CLI Override | API Override |
| ------------------------------------------------------------------------------------------------ | ------------------ | -------------------------- |
| [`basic template`](https://github.com/gregberge/svgr/blob/master/packages/cli/src/dirCommand.js) | `--index-template` | indexTemplate: files => '' |
| [`basic template`](https://github.com/gregberge/svgr/blob/main/packages/cli/src/dirCommand.ts) | `--index-template` | indexTemplate: files => '' |

## index.js file

Expand Down

1 comment on commit 0927303

@vercel
Copy link

@vercel vercel bot commented on 0927303 Jan 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.