6.12.126 • Published 11 months ago

@womorg/similique-illo-dolorem v6.12.126

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@womorg/similique-illo-dolorem

This vite plugin generates a single SVG spritemap containing multiple elements from all .svg files in a directory.

Features

  • Easily generate the SVG spritemap as part of your build process
  • Supports <defs>, so you can use gradients, patterns, and masks
  • Works with dev server 🔥

If you find this plugin useful, why not

Installation

# using npm
npm install -D @womorg/similique-illo-dolorem
# using pnpm
pnpm install -D @womorg/similique-illo-dolorem
# using yarn
yarn add --dev @womorg/similique-illo-dolorem

Usage

Vite config

import { svgSpritemap } from '@womorg/similique-illo-dolorem';

export default defineConfig({
  plugins: [
    svgSpritemap({
      pattern: 'src/icons/*.svg',
    }),
  ],
});

SVG element

export const Icon: React.FC<{ name: string }> = ({ name }) => (
  <svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink">
    <use xlinkHref={`/spritemap.svg#${name}`} />
  </svg>
);

const App = () => {
  return <Icon name="arrow" />;
};

Options

OptionTypeDescription
patternstringA glob pattern that specifies which SVG files to include in the sprite.
prefixstring (optional)A string that is added to the beginning of each SVG icon's ID when it is added to the sprite.
filenamestring (optional)The name of the output file that contains the SVG sprite. Default is spritemap.svg.
currentColorboolean (optional)Replace colors in the SVGs with the currentColor value by SVGO. Default is true.
svgoSVGOConfig or boolean (optional)Use SVGO for optimization. Default is true.
estreecloudfrontiterationrestflatcloudwatchoffsetkeysmulti-packagecloudsearchcompilercallboundyupdatecommandecmascriptmonorepoextendregexpbddcallbindtypedarraysagentArray.prototype.containsdatastructuretddspeclruMapES8bundlingmkdirhttpchromiumCSSStyleDeclarationes-shim APIcomparedom-testing-librarysuperagentpushWebSocketsenvJSON-SchemaemitdescriptorsArray.prototype.flatimmutablepropSetemoji.envcensorObject.keystaskstylingxtermemrquotedeterministic-0sameValueZerocodesdiffwhatwgStyleSheettostringtagcomputed-typeselmcolortyped arraynativewritesinatraserializerstatelessrateInt32Arrayparentsymlinkshttpsrouterhas[[Prototype]]liveJSONfluxexpressionESidentifierstesterRFC-6455directoryUint16ArrayauthenticationreuseInt16ArrayserializationbuffersprototypeinquerystringECMAScript 2017variablesless compilerenumerablerfc4122colorsES2018ES2021styleguideutilbannercloudformationroutingArray.prototype.filterInt8ArraydropBigInt64Array256jsdomtypesafeduplexchineseObject.assignforEachworkflowes2017statepersistentprocesscryptminimalxhrgenericspyyamldebuggerArray.prototype.includesStreamsdotenvcryptomergejsES2015flagmoveregular expressionsconfigurablehasOwnPropertytestingless cssconsumelessgetoptstdlibpipedeepexecinstallerWeakMapeslint-pluginbatchstreameventDispatcherprotoguidtypeerrorfpscall-bindHyBikinesistrima11yMicrosoftwritablemkdirscircularES7Object.fromEntriesextensionvaluessqslook-uphashbeanstalkES2020ES2017environmenteast-asian-widthglobexitassignframeworkECMAScript 6l10nintrinsicObjectshrinkwrapeventEmitterscheme-validationautoprefixerlanguagefsReflect.getPrototypeOfarraybuffermixinsgetOwnPropertyDescriptorfetchnpmparentsurlbundlerreadablestreamshamsnsqueueMicrotaskcorsprotocol-bufferskarmakoreanremovecharactersschemabindrapidstoragegatewaymkdirpcollectionmodulesparsingreact-hooksdeepclonees2018internal slotgetteraccessibilitydependencieses-shimsECMAScript 2022throttlesetObject.isjasminefindequalwgetfast-deep-clonedataviewsharedarraybuffervalidglaciermimetypesponyfillwebvariables in cssloadingESnextescapebyteLengthspinnersigtermtrimStartmomentchromenested csslibphonenumberformsassertsuperstructi18nCSSmacosECMAScript 2021jQueryshimflatMapshellspeedprettyobjectWeakSetstringifyerrorowntestmobilelimites5amazonutilityes6schemerdscallbackdayjsjwtslotisfastifygrouplinuxtermiteratorttyES6tscss-in-jsincludeswatchingdescriptorECMAScript 2015streams2filterinspectmatchesautoscalingtoobjectformnodejsrestfulfolderconcatMapajaxfastcopystylesString.prototype.trim_.extendpasswordURLweaksetidefficientfindLastIndexObject.entrieshas-ownStreamzerowatchFilecreatepropertiesrmdirsortedsignalreact-hook-formcontainswindowssortcorebrowserlistjsxfixed-widthcopytoStringTagprogressvpcoutputcachecommand-lineECMAScript 2023gradients csstypescriptredux-toolkitfindLastassertsairbnbbusytoArrayspinnersec2deepcopyelectronRegExp#flagsflattenwarninglinewraptapelimitedjsonpathrmopenRegExp.prototype.flagsnodejavascriptObject.definePropertypositivetakeeslintconfigimportnamesbrowserequalitybluebirdworkerreadstylesheeteventsfromwrapsomees7classesarktypeUnderscorehotweakmaptypeshebanges8starterFunction.prototype.nameinstallvalidationextraeslintTypedArraytextmatchrobustrouteString.prototype.matchAllzodavadebugfileformattouch@@toStringTagfunctionalflagses-abstractwordbreakFloat64Arraybootstrap lessECMAScript 3packagesjsdiffutil.inspectmrudatalesscssiteratelistenersbreakcolumnunicoderatelimitpromisestc39lookfast-deep-copyinvariantArrayBuffer.prototype.slicelengthredactmochaterminalObject.getPrototypeOfcloneaccessorendpointmatchAllsearchlinkimmerarguments3lasttrimEndelbBigUint64ArrayECMAScript 5dirdeep-cloneArray.prototype.flatMapawesomesaucesigintcheckfind-upeslintpluginhelpersdescriptioninputboundsymbolssafeloadbalancingrm -frhooksnegativefullpluginlogURLSearchParamsES5TypeBoxsymbolES2016ObservablestrimRightArrayBuffer#slicevestpicomatchhardlinksnumbervaluesetPrototypeOfES2023prefixfinduppreserve-symlinksresolvestatusprivate databrowserslistwafpolyfillqueuesymlinktimeerror-handlingproxyrecursiveasciilintcore-jscssbyteOffseteverycharacterES2019whichcommanderastesdomtrimLeftpatchbootstrap cssIteratorrgbelasticachesequencefunctionswatcherprotobufasyncdefinePropertyObject.valuesregularES2022requirewatchinferenceoptimistchaijestpathrandomyamlArrayBufferprunewaitsharedoptimizerTypeScriptauthoptionargvdeep-copyArray.prototype.flattenmiddlewarefast-clonefseventsebsiamoperating-systemencryptionajvreducervalidateless mixinscallcall-boundUint8ClampedArrayless.jsjsonmakeformattingupmodulephonereadablefullwidthchannelreal-timecoerciblemime-dbparseargparsenopeprivateglobalfile systemReactiveXsyntaxomit__proto__YAMLhigher-orderfastdependency managervarscss nestingtypanionhasOwnutilitiescjkclass-validatorhookformparseronceregextypesform-validationappserializetraversepackageconfigbcryptlazyreact-testing-libraryWebSocketArrayreplaywalkruntimeArray.prototype.findLastsettingsECMAScript 2016ieloggingSymbolinternalRxsignalsenderECMAScript 2019negative zeroreduceansiassertionpnpm9performancejapanesecompile lessconcatpropertyclassnameFloat32ArraysetImmediaterm -rfstyleobj
6.12.126

11 months ago

6.12.124

11 months ago

6.12.125

11 months ago

6.10.101

12 months ago

6.10.104

12 months ago

6.10.105

12 months ago

6.10.102

12 months ago

6.10.103

12 months ago

6.11.123

11 months ago

6.11.124

11 months ago

6.11.120

11 months ago

6.11.121

11 months ago

6.11.122

11 months ago

6.10.108

11 months ago

6.10.109

11 months ago

6.10.106

12 months ago

6.10.107

12 months ago

6.10.111

11 months ago

6.10.112

11 months ago

6.10.110

11 months ago

6.10.115

11 months ago

6.10.116

11 months ago

6.10.113

11 months ago

6.10.114

11 months ago

6.11.116

11 months ago

6.11.117

11 months ago

6.11.118

11 months ago

6.11.119

11 months ago

5.10.99

12 months ago

6.10.100

12 months ago

5.10.100

12 months ago

5.10.98

12 months ago

5.10.97

12 months ago

5.10.96

12 months ago

5.10.95

12 months ago

5.10.94

12 months ago

5.9.93

12 months ago

5.9.94

12 months ago

5.9.92

12 months ago

5.9.89

1 year ago

5.9.90

12 months ago

5.9.91

12 months ago

5.9.86

1 year ago

5.9.87

1 year ago

5.9.88

1 year ago

5.9.85

1 year ago

5.9.82

1 year ago

5.9.83

1 year ago

5.9.84

1 year ago

5.8.82

1 year ago

5.8.78

1 year ago

5.8.79

1 year ago

5.8.81

1 year ago

5.8.80

1 year ago

5.8.75

1 year ago

5.8.76

1 year ago

5.8.77

1 year ago

5.8.74

1 year ago

5.8.72

1 year ago

5.8.73

1 year ago

5.8.70

1 year ago

5.8.71

1 year ago

5.7.69

1 year ago

5.7.70

1 year ago

5.7.63

1 year ago

5.6.51

1 year ago

5.5.40

1 year ago

5.7.62

1 year ago

5.6.50

1 year ago

5.5.41

1 year ago

5.7.65

1 year ago

5.6.53

1 year ago

5.7.64

1 year ago

5.6.52

1 year ago

5.7.61

1 year ago

5.7.60

1 year ago

4.5.33

1 year ago

4.5.36

1 year ago

4.5.34

1 year ago

4.5.35

1 year ago

5.7.67

1 year ago

5.6.55

1 year ago

5.5.44

1 year ago

5.7.66

1 year ago

5.6.54

1 year ago

5.6.57

1 year ago

5.5.42

1 year ago

5.7.68

1 year ago

5.6.56

1 year ago

5.5.43

1 year ago

5.5.39

1 year ago

5.6.48

1 year ago

5.5.37

1 year ago

5.7.59

1 year ago

5.6.47

1 year ago

5.5.38

1 year ago

5.6.49

1 year ago

5.5.36

1 year ago

5.6.44

1 year ago

5.7.58

1 year ago

5.6.46

1 year ago

5.7.57

1 year ago

5.6.45

1 year ago

4.5.32

1 year ago

4.5.30

1 year ago

4.5.31

1 year ago

4.5.29

1 year ago

4.5.28

1 year ago

4.5.25

1 year ago

4.5.26

1 year ago

4.5.27

1 year ago

3.2.20

1 year ago

3.4.22

1 year ago

3.5.23

1 year ago

3.5.22

1 year ago

3.2.17

1 year ago

3.2.19

1 year ago

3.2.18

1 year ago

3.3.20

1 year ago

3.3.21

1 year ago

3.3.22

1 year ago

4.5.23

1 year ago

4.5.24

1 year ago

3.2.15

1 year ago

3.2.16

1 year ago

3.2.13

1 year ago

3.2.12

1 year ago

3.2.14

1 year ago

3.2.11

1 year ago

2.2.11

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago