4.9.82 • Published 10 months ago

@taktikorg/delectus-quo-nobis v4.9.82

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

@taktikorg/delectus-quo-nobis

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 @taktikorg/delectus-quo-nobis
# using pnpm
pnpm install -D @taktikorg/delectus-quo-nobis
# using yarn
yarn add --dev @taktikorg/delectus-quo-nobis

Usage

Vite config

import { svgSpritemap } from '@taktikorg/delectus-quo-nobis';

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.
isobjectObjectpoint-freeimportexportgenericseventDispatcherArray.prototype.flattraverseyupmkdirtranspileintrinsicFloat64Arraybabelpatchinterruptsstylingexit-codeconsumehelpersterminalenvironmentoptionescapecolumnstrimdirectoryeffect-tsdropconcatMapredactUint8ClampedArrayvalidxhrefficientlastES8trimRightidentifiershelperoptimizerpathvalidatedynamodbsameValueZerobufferstylesheetomitamazondefinePropertykinesislesscssgetPrototypeOfchromiumapia11yESnextoperating-systemreact posejQueryless.jsbinaryliverangeerror.envCSSmatchescss-in-jsviewenvironmentseswindowlazy6to5class-validatorbdddragparseflagscss variabledataviewvariablesconstbytevares8cloudformationbusybootstrap csswarningchinesefast-copyObject.valuesmanagerSetmakefull-widthsubprocessES2021authFunction.prototype.nametc39sortedflatMapasteriskssuperagentinvariantECMAScript 2023toReversedposechaiweaksetwriteglobdayjsAsyncIteratormonorepostyleclassesdescriptorsrfc9562characterreact-componentcontainsvaluespawntextArray.prototype.findLastIndexjapaneseregexiampreprocessorfast-deep-copycommand-lineutil.inspectutilscircularrouteonceObject.keysjavascriptES7Int8Arraydeterministicbannerelbhttpes6dependenciesObject.getPrototypeOflinkrequiremapuninstallpipeObject.definePropertyes7postcss-pluginextrasequencepromisethreeslotArrayBuffer#sliceconsolearktypesettingsless compilertoStringTagautoprefixerurlschemaairbnbcoerciblesns-0function.lengthsafenodeUint32Arrayutilitypnpm9childcolourquotecall-boundjson-schemapolyfillspinnersarraybufferreact-testing-librarymoduletypedarraystoolsECMAScript 5curlestreephoneregexpprefixECMAScript 2015i18nbootstrap lesschecksuperstructstateargsfileglobalsjestprotocol-buffersES2017privatepure3dchannelfastifylengthprotomkdirpreusereadablestylesvarshookssigintreact-hook-formbufferstoobjectajvbeanstalkramdapackage.jsonenumerablesyntaxxtermwidthreal-timebundlerswfutilfluxstoragegatewayloggingtypedarraycachehasOwnPropertyiteratescheme-validationsideastremoveprivate dataECMAScript 6tslibgdprObservablelogger
4.9.82

10 months ago

4.8.82

10 months ago

4.8.81

10 months ago

4.8.80

10 months ago

4.8.79

10 months ago

4.8.78

11 months ago

4.7.78

11 months ago

4.7.77

11 months ago

4.7.76

11 months ago

4.7.75

11 months ago

4.7.74

11 months ago

4.7.73

11 months ago

4.7.72

11 months ago

4.7.71

11 months ago

3.7.71

11 months ago

3.7.70

11 months ago

3.7.69

11 months ago

3.7.68

11 months ago

3.7.67

11 months ago

3.7.66

11 months ago

3.6.66

11 months ago

3.6.65

11 months ago

3.6.64

11 months ago

3.6.63

11 months ago

3.6.62

11 months ago

3.6.61

11 months ago

3.6.60

11 months ago

3.6.59

11 months ago

3.6.58

11 months ago

3.6.57

11 months ago

3.6.56

11 months ago

3.6.55

11 months ago

3.6.54

11 months ago

3.6.53

11 months ago

2.6.53

11 months ago

2.6.52

12 months ago

2.6.51

12 months ago

2.6.50

12 months ago

2.6.49

12 months ago

2.5.49

12 months ago

2.5.48

12 months ago

2.5.47

12 months ago

2.5.46

12 months ago

2.4.46

12 months ago

2.4.45

12 months ago

2.4.44

12 months ago

2.4.43

12 months ago

2.4.42

12 months ago

2.4.41

12 months ago

2.3.41

12 months ago

2.3.40

12 months ago

2.3.39

12 months ago

2.3.38

12 months ago

2.3.37

12 months ago

2.3.36

12 months ago

2.3.35

1 year ago

2.3.34

1 year ago

2.3.33

1 year ago

2.3.32

1 year ago

2.3.31

1 year ago

2.3.30

1 year ago

2.3.29

1 year ago

2.3.28

1 year ago

2.3.27

1 year ago

1.3.27

1 year ago

1.3.26

1 year ago

1.3.25

1 year ago

1.2.25

1 year ago

1.2.24

1 year ago

1.2.23

1 year ago

1.2.22

1 year ago

1.2.21

1 year ago

1.2.20

1 year ago

1.2.19

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

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