1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00

Add guidelines data to NPM package and documenation (#5342)

This commit is contained in:
Eric Cornelissen 2021-03-26 10:33:04 +01:00 committed by GitHub
parent 92212600b0
commit 9fdbb57ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -66,12 +66,14 @@ console.log(icon);
source: 'https://simpleicons.org/',
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg>',
path: 'M12 12v-1.5c-2.484 ...',
guidelines: 'https://simpleicons.org/styleguide',
license: {
type: '...',
url: 'https://example.com/'
}
}
NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines data for the icon.
NOTE: the `license` entry will be `undefined` if we do not yet have license data for the icon.
*/
```
@ -96,12 +98,14 @@ console.log(icon);
source: 'https://simpleicons.org/',
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg>',
path: 'M12 12v-1.5c-2.484 ...',
guidelines: 'https://simpleicons.org/styleguide',
license: {
type: '...',
url: 'https://example.com/'
}
}
NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines data for the icon.
NOTE: the license may be `undefined` if there is no license data for the icon.
*/
```

View File

@ -56,6 +56,7 @@ function iconToObject(icon) {
escape(icon.svg),
escape(icon.source),
escape(icon.hex),
icon.guidelines ? `'${escape(icon.guidelines)}'` : undefined,
licenseToObject(icon.license),
);
}

View File

@ -7,5 +7,6 @@
},
source: '%s',
hex: '%s',
guidelines: %s,
license: %s,
}