Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ddamato committed Jun 10, 2020
1 parent a2ba112 commit 819a92b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ The method returns an object with up to 3 keys.
This helper method allows you to include additional symbols to reference _after_ calling the constructor.

### Options
These are the available options which can be passed into either the second parameter of the `new Savager()` constructor which _affects every call of `.prepareAssets()` from the instance_ **or** the second parameter of the `.prepareAssets()` method which _affects only that call_. The description explains the return value after calling `.prepareAssets()`.
These are the available options which can be passed into the second parameter of either the `new Savager()` constructor or `.prepareAssets()`.

Using it on the constructor _affects every call of `.prepareAssets()`_ made from the instance.

Using it on the method `.prepareAssets()` _affects only that call_.

#### `attemptInject`
**`Boolean`** `false`
Expand All @@ -103,17 +107,17 @@ One or a list of class names to add to the SVG assets.
#### `consolidate`
**`Boolean` or `String`** `true`

When set to `true`, this will attempt to consolidate reference sheets if multiple usages of Savager are used on the page. When set to a String, it will be the `id` of the single reference sheet on the page after consolidation. Setting to `false` will not consolidate reference sheets.
When set to `true`, this will attempt to consolidate reference sheets if multiple usages of Savager are used on the page. When set to a `String`, it will be the `id` of the single reference sheet on the page after consolidation. Setting to `false` will not consolidate reference sheets.

#### `externalUrl`
**`Boolean` or `String`** `void`

If your assets are hosted externally (eg. CDN), you can provide the path to the assets here. Using this will not provide a `sheet` key when using this option.
If your assets are hosted externally (eg. CDN), you can provide the path to the assets here. Using this will not return a `sheet` resource when preparing assets.

#### `toSvgElement`
**`Boolean` or `Function`** `false`

When providing a function, the input will be SVG asset string which may transform into an element for the needs of your app.
When providing a function, the input will be SVG asset string which may transform into an element for the needs of your app. When providing `true`, it wil use a default render function to return valid `SVGElement` nodes.

---

Expand Down

0 comments on commit 819a92b

Please sign in to comment.