Skip to content

Commit

Permalink
Update share icon and add major version to docs.md (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikbacker authored Aug 24, 2018
1 parent 4190fb1 commit ac35c00
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/core-icons.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["nrk-arrow-left-long.svg","nrk-arrow-left.svg","nrk-arrow-right-long.svg","nrk-arrow-right.svg","nrk-bell--active.svg","nrk-bell.svg","nrk-bookmark--active.svg","nrk-bookmark.svg","nrk-calendar.svg","nrk-chevron-down.svg","nrk-chevron-left.svg","nrk-chevron-right.svg","nrk-chevron-up.svg","nrk-close-circle.svg","nrk-close.svg","nrk-comment.svg","nrk-dice-1--active.svg","nrk-dice-1.svg","nrk-dice-2--active.svg","nrk-dice-2.svg","nrk-dice-3--active.svg","nrk-dice-3.svg","nrk-dice-4--active.svg","nrk-dice-4.svg","nrk-dice-5--active.svg","nrk-dice-5.svg","nrk-dice-6--active.svg","nrk-dice-6.svg","nrk-download.svg","nrk-duration.svg","nrk-fullscreen--active.svg","nrk-fullscreen.svg","nrk-gallery.svg","nrk-geo--active.svg","nrk-geo.svg","nrk-geopoint--active.svg","nrk-geopoint.svg","nrk-heart--active.svg","nrk-heart.svg","nrk-help.svg","nrk-home--active.svg","nrk-home.svg","nrk-info.svg","nrk-latest-news--active.svg","nrk-latest-news.svg","nrk-link.svg","nrk-lock--active.svg","nrk-lock.svg","nrk-logo-nrk-1.svg","nrk-logo-nrk-2.svg","nrk-logo-nrk-3.svg","nrk-logo-nrk-alltid-nyheter.svg","nrk-logo-nrk-folkemusikk.svg","nrk-logo-nrk-jazz.svg","nrk-logo-nrk-klassisk.svg","nrk-logo-nrk-mp3-symbol.svg","nrk-logo-nrk-mp3.svg","nrk-logo-nrk-nyheter.svg","nrk-logo-nrk-p1-pluss.svg","nrk-logo-nrk-p1.svg","nrk-logo-nrk-p13-radioresepsjonen.svg","nrk-logo-nrk-p13.svg","nrk-logo-nrk-p2.svg","nrk-logo-nrk-p3-national-rap-show.svg","nrk-logo-nrk-p3-symbol.svg","nrk-logo-nrk-p3-urort.svg","nrk-logo-nrk-p3.svg","nrk-logo-nrk-radio.svg","nrk-logo-nrk-sapmi.svg","nrk-logo-nrk-sport.svg","nrk-logo-nrk-super-sentrert.svg","nrk-logo-nrk-super-symbol.svg","nrk-logo-nrk-super.svg","nrk-logo-nrk-tegnspraak.svg","nrk-logo-nrk-tv.svg","nrk-logo-nrk.svg","nrk-logo-yr.svg","nrk-longread--active.svg","nrk-longread.svg","nrk-mat.svg","nrk-media-404-notfound.svg","nrk-media-airplay--active.svg","nrk-media-airplay.svg","nrk-media-chromecast--active.svg","nrk-media-chromecast.svg","nrk-media-direkte--active.svg","nrk-media-direkte.svg","nrk-media-direktetv.svg","nrk-media-ffw-15sec.svg","nrk-media-ffw-30sec.svg","nrk-media-ffw.svg","nrk-media-next.svg","nrk-media-pause.svg","nrk-media-picture-in-picture--active.svg","nrk-media-picture-in-picture.svg","nrk-media-play.svg","nrk-media-previous.svg","nrk-media-programguide.svg","nrk-media-rwd-15sec.svg","nrk-media-rwd-30sec.svg","nrk-media-rwd.svg","nrk-media-stop.svg","nrk-media-subtitles--active.svg","nrk-media-subtitles--unavailable.svg","nrk-media-subtitles.svg","nrk-media-tilgjengelighet-geoblocked.svg","nrk-media-tilgjengelighet-ikkelengertilgjengelig.svg","nrk-media-tilgjengelighet-kommer.svg","nrk-media-volume--1.svg","nrk-media-volume--2.svg","nrk-media-volume--3.svg","nrk-media-volume--muted.svg","nrk-mening.svg","nrk-minus.svg","nrk-offline.svg","nrk-open-in-new.svg","nrk-plus.svg","nrk-poll.svg","nrk-reload.svg","nrk-search.svg","nrk-settings--active.svg","nrk-settings.svg","nrk-some-email.svg","nrk-some-embed.svg","nrk-some-facebook.svg","nrk-some-google.svg","nrk-some-instagram.svg","nrk-some-share--active.svg","nrk-some-share.svg","nrk-some-snapchat.svg","nrk-some-twitter.svg","nrk-some-youtube.svg","nrk-spinner.svg","nrk-star--active.svg","nrk-star.svg","nrk-tilgjengelighet-horbarhet.svg","nrk-tilgjengelighet-lydtekst.svg","nrk-tilgjengelighet-synstolking.svg","nrk-tilgjengelighet-tegnspraak.svg","nrk-tilgjengelighet.svg","nrk-upload.svg","nrk-user-loggedin.svg","nrk-user-notloggedin.svg"]
["nrk-arrow-left-long.svg","nrk-arrow-left.svg","nrk-arrow-right-long.svg","nrk-arrow-right.svg","nrk-bell--active.svg","nrk-bell.svg","nrk-bookmark--active.svg","nrk-bookmark.svg","nrk-calendar.svg","nrk-chevron-down.svg","nrk-chevron-left.svg","nrk-chevron-right.svg","nrk-chevron-up.svg","nrk-close-circle.svg","nrk-close.svg","nrk-comment.svg","nrk-dice-1--active.svg","nrk-dice-1.svg","nrk-dice-2--active.svg","nrk-dice-2.svg","nrk-dice-3--active.svg","nrk-dice-3.svg","nrk-dice-4--active.svg","nrk-dice-4.svg","nrk-dice-5--active.svg","nrk-dice-5.svg","nrk-dice-6--active.svg","nrk-dice-6.svg","nrk-download.svg","nrk-duration.svg","nrk-fullscreen--active.svg","nrk-fullscreen.svg","nrk-gallery.svg","nrk-geo--active.svg","nrk-geo.svg","nrk-geopoint--active.svg","nrk-geopoint.svg","nrk-heart--active.svg","nrk-heart.svg","nrk-help.svg","nrk-home--active.svg","nrk-home.svg","nrk-info.svg","nrk-latest-news--active.svg","nrk-latest-news.svg","nrk-link.svg","nrk-lock--active.svg","nrk-lock.svg","nrk-logo-nrk-1.svg","nrk-logo-nrk-2.svg","nrk-logo-nrk-3.svg","nrk-logo-nrk-alltid-nyheter.svg","nrk-logo-nrk-folkemusikk.svg","nrk-logo-nrk-jazz.svg","nrk-logo-nrk-klassisk.svg","nrk-logo-nrk-mp3-symbol.svg","nrk-logo-nrk-mp3.svg","nrk-logo-nrk-nyheter.svg","nrk-logo-nrk-p1-pluss.svg","nrk-logo-nrk-p1.svg","nrk-logo-nrk-p13-radioresepsjonen.svg","nrk-logo-nrk-p13.svg","nrk-logo-nrk-p2.svg","nrk-logo-nrk-p3-national-rap-show.svg","nrk-logo-nrk-p3-symbol.svg","nrk-logo-nrk-p3-urort.svg","nrk-logo-nrk-p3.svg","nrk-logo-nrk-radio.svg","nrk-logo-nrk-sapmi.svg","nrk-logo-nrk-sport.svg","nrk-logo-nrk-super-sentrert.svg","nrk-logo-nrk-super-symbol.svg","nrk-logo-nrk-super.svg","nrk-logo-nrk-tegnspraak.svg","nrk-logo-nrk-tv.svg","nrk-logo-nrk.svg","nrk-logo-yr.svg","nrk-longread--active.svg","nrk-longread.svg","nrk-mat.svg","nrk-media-404-notfound.svg","nrk-media-airplay--active.svg","nrk-media-airplay.svg","nrk-media-chromecast--active.svg","nrk-media-chromecast.svg","nrk-media-direkte--active.svg","nrk-media-direkte.svg","nrk-media-direktetv.svg","nrk-media-ffw-15sec.svg","nrk-media-ffw-30sec.svg","nrk-media-ffw.svg","nrk-media-next.svg","nrk-media-pause.svg","nrk-media-picture-in-picture--active.svg","nrk-media-picture-in-picture.svg","nrk-media-play.svg","nrk-media-previous.svg","nrk-media-programguide.svg","nrk-media-rwd-15sec.svg","nrk-media-rwd-30sec.svg","nrk-media-rwd.svg","nrk-media-stop.svg","nrk-media-subtitles--active.svg","nrk-media-subtitles--unavailable.svg","nrk-media-subtitles.svg","nrk-media-tilgjengelighet-geoblocked.svg","nrk-media-tilgjengelighet-ikkelengertilgjengelig.svg","nrk-media-tilgjengelighet-kommer.svg","nrk-media-volume--1.svg","nrk-media-volume--2.svg","nrk-media-volume--3.svg","nrk-media-volume--muted.svg","nrk-mening.svg","nrk-minus.svg","nrk-offline.svg","nrk-open-in-new.svg","nrk-plus.svg","nrk-poll.svg","nrk-reload.svg","nrk-search.svg","nrk-settings--active.svg","nrk-settings.svg","nrk-some-email.svg","nrk-some-embed.svg","nrk-some-facebook.svg","nrk-some-google.svg","nrk-some-instagram.svg","nrk-some-share.svg","nrk-some-snapchat.svg","nrk-some-twitter.svg","nrk-some-youtube.svg","nrk-spinner.svg","nrk-star--active.svg","nrk-star.svg","nrk-tilgjengelighet-horbarhet.svg","nrk-tilgjengelighet-lydtekst.svg","nrk-tilgjengelighet-synstolking.svg","nrk-tilgjengelighet-tegnspraak.svg","nrk-tilgjengelighet.svg","nrk-upload.svg","nrk-user-loggedin.svg","nrk-user-notloggedin.svg"]
2 changes: 1 addition & 1 deletion lib/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm install @nrk/core-icons --save # Use from NPM
```
```html
<!-- Use from static.nrk.no: insert just before </body> -->
<script async src="https://static.nrk.no/core-icons/latest/core-icons.min.js"></script>
<script async src="https://static.nrk.no/core-icons/major/3/core-icons.min.js"></script>
```

---
Expand Down
7 changes: 0 additions & 7 deletions lib/nrk-some-share--active.svg

This file was deleted.

6 changes: 1 addition & 5 deletions lib/nrk-some-share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default [{
}]

function intro () {
const md = fs.readFileSync('./lib/docs.md')
const files = fs.readdirSync('./lib').filter((file) => file.slice(-4) === '.svg')
const icons = files.map((file) => {
const code = String(fs.readFileSync(`./lib/${file}`))
Expand All @@ -67,6 +68,7 @@ function intro () {
return `'${file.slice(0, -4)}':['${body}',${size[2]},${size[3]}]` // Generate JS instead of JSON to save bytes
})

fs.writeFileSync('./lib/docs.md', String(md).replace(/\/major\/\d+/, `/major/${pkg.version.match(/\d+/)}`))
fs.writeFileSync('./lib/core-icons.json', JSON.stringify(files))
return `var ICONS = {${icons.join(',')}}`
}

0 comments on commit ac35c00

Please sign in to comment.