kopia lustrzana https://github.com/badgen/badgen
(chore) examples, benchmarks update
rodzic
42c4de58cb
commit
b256b23138
|
@ -2,14 +2,14 @@ const { Suite } = require('benchmark')
|
|||
const badgen = require('..')
|
||||
|
||||
const longParams = { subject: 'build-build-build', status: 'passing-passing-passing' }
|
||||
const fullParams = { subject: 'license', status: 'MIT', color: 'cyan' }
|
||||
const emojiParams = { subject: 'emojis', status: '💩🤱🦄', color: 'cyan' }
|
||||
const fullParams = { subject: 'license', status: 'Apache 2.0', color: 'cyan' }
|
||||
const emojiParams = { subject: 'emojis', status: '💩🤱🦄💩🤱🦄', color: 'cyan' }
|
||||
|
||||
new Suite()
|
||||
.add('[classic] style, long params ', () => badgen(longParams))
|
||||
.add('[classic] style, full params ', () => badgen(fullParams))
|
||||
.add(' [flat] style, long params ', () => badgen({ style: 'flat', ...longParams }))
|
||||
.add(' [flat] style, full params ', () => badgen({ style: 'flat', ...fullParams }))
|
||||
.add('[classic] style, multi bytes ', () => badgen(emojiParams))
|
||||
.add('[classic] style, emoji params', () => badgen(emojiParams))
|
||||
.on('cycle', event => console.log(String(event.target)))
|
||||
.run()
|
||||
|
|
|
@ -25,7 +25,7 @@ const serveIndex = serveMarked(md, {
|
|||
title: 'Badgen - Fast badge generator',
|
||||
preset: 'merri',
|
||||
inlineCSS: `
|
||||
body { color: #333 }
|
||||
body { color: #333; padding-bottom: 5em }
|
||||
a { text-decoration: none; color: #06D }
|
||||
a:hover { text-decoration: underline }
|
||||
table { border-spacing: 0 }
|
||||
|
|
Ładowanie…
Reference in New Issue