Skip to content

Commit

Permalink
Make docs more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Nov 2, 2021
1 parent 72b9722 commit 5165ccb
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,18 @@ There is a set of [built-in plugins](#built-in-plugins). See how to configure th
module.exports = {
plugins: [
// enable a built-in plugin by name
'builtinPluginName',
'prefixIds',

// or by expanded version
{
name: 'builtinPluginName',
name: 'prefixIds',
},

// some plugins allow/require to pass options
{
name: 'builtinPluginName',
name: 'prefixIds',
params: {
optionName: 'optionValue',
prefix: 'my-prefix',
},
},
],
Expand All @@ -90,21 +92,24 @@ module.exports = {
params: {
overrides: {
// customize options for plugins included in preset
builtinPluginName: {
optionName: 'optionValue',
inlineStyles: {
onlyMatchedOnce: false,
},

// or disable plugins
anotherBuiltinPlugin: false,
removeDoctype: false,
},
},
},
// Enable builtin plugin not included in preset
'moreBuiltinPlugin',
// Enable and configure builtin plugin not included in preset

// enable builtin plugin not included in default preset
'prefixIds',

// enable and configure builtin plugin not included in preset
{
name: 'manyBuiltInPlugin',
name: 'sortAttrs',
params: {
optionName: 'value',
xmlnsOrder: 'alphabetical',
},
},
],
Expand Down

1 comment on commit 5165ccb

@Syubukov
Copy link

Choose a reason for hiding this comment

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

import gulp from 'gulp';
import svgmin from 'gulp-svgmin';

const defaultTask = () =>
gulp.src('src/arrow.svg')
.pipe(svgmin({
js2svg: {
pretty: true,
indent: 2,
},
plugins: [
{ removeViewBox: false },
'removeXMLNS'
],
}))
.pipe(gulp.dest('./dist'));

export default defaultTask;

Please, say what Im doing wrong. I want remove XMLNS attribute, but nothing happen.

Please sign in to comment.