mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-15 18:04:12 +03:00
No longer require no final newline in SVGs (#1682)
* Introduce newline into a SVG for testing purposes * Remove potential newlines from SVGs when building the package * Don't lint SVG files ... so it is neither required to have, or not have, a final newline * Remove both Windows and Unix style newlines in build script * Rever 3372ca3
This commit is contained in:
parent
fcc89c9461
commit
93425f8aa0
@ -30,7 +30,7 @@
|
||||
"clean": "rm icons/*.js index.js",
|
||||
"jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema",
|
||||
"svglint": "svglint icons/* --ci",
|
||||
"wslint": "editorconfig-checker --ignore",
|
||||
"wslint": "editorconfig-checker",
|
||||
"prepublishOnly": "npm run build",
|
||||
"postpublish": "npm run clean",
|
||||
"test": "jest",
|
||||
|
@ -47,7 +47,7 @@ function iconToObject(icon) {
|
||||
const icons = [];
|
||||
data.icons.forEach(icon => {
|
||||
const filename = titleToFilename(icon.title);
|
||||
icon.svg = fs.readFileSync(`${iconsDir}/${filename}.svg`, UTF8);
|
||||
icon.svg = fs.readFileSync(`${iconsDir}/${filename}.svg`, UTF8).replace(/\r?\n/, '');
|
||||
icon.slug = filename;
|
||||
icons.push(icon);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user