mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-05-02 17:16:42 +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",
|
"clean": "rm icons/*.js index.js",
|
||||||
"jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema",
|
"jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema",
|
||||||
"svglint": "svglint icons/* --ci",
|
"svglint": "svglint icons/* --ci",
|
||||||
"wslint": "editorconfig-checker --ignore",
|
"wslint": "editorconfig-checker",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postpublish": "npm run clean",
|
"postpublish": "npm run clean",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
@ -47,7 +47,7 @@ function iconToObject(icon) {
|
|||||||
const icons = [];
|
const icons = [];
|
||||||
data.icons.forEach(icon => {
|
data.icons.forEach(icon => {
|
||||||
const filename = titleToFilename(icon.title);
|
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;
|
icon.slug = filename;
|
||||||
icons.push(icon);
|
icons.push(icon);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user