Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
feather
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
feather
Commits
d33cb6ec
Unverified
Commit
d33cb6ec
authored
Apr 04, 2018
by
Cole Bemis
Committed by
GitHub
Apr 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: Use uppercase for default attrs import
parent
b22f3b45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
build-sprite-string.js
bin/build-sprite-string.js
+3
-3
No files found.
bin/build-sprite-string.js
View file @
d33cb6ec
import
defaultAttrs
from
'
../src/default-attrs.json
'
;
import
DEFAULT_ATTRS
from
'
../src/default-attrs.json
'
;
/**
* Build an SVG sprite string containing SVG symbols.
...
...
@@ -10,7 +10,7 @@ function buildSpriteString(icons) {
.
map
(
icon
=>
toSvgSymbol
(
icon
,
icons
[
icon
]))
.
join
(
''
);
return
`<svg xmlns="
${
defaultAttrs
.
xmlns
}
"><defs>
${
symbols
}
</defs></svg>`
;
return
`<svg xmlns="
${
DEFAULT_ATTRS
.
xmlns
}
"><defs>
${
symbols
}
</defs></svg>`
;
}
/**
...
...
@@ -20,7 +20,7 @@ function buildSpriteString(icons) {
* @returns {string}
*/
function
toSvgSymbol
(
name
,
contents
)
{
return
`<symbol id="
${
name
}
" viewBox="
${
defaultAttrs
.
viewBox
}
">
${
return
`<symbol id="
${
name
}
" viewBox="
${
DEFAULT_ATTRS
.
viewBox
}
">
${
contents
}
</symbol>`
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment