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:
Eric Cornelissen 2019-09-30 19:34:42 +03:00 committed by Johan Fagerberg
parent fcc89c9461
commit 93425f8aa0
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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);