kopia lustrzana https://github.com/badgen/badgen
Add now alias config
rodzic
67111d100a
commit
31b56b2f4e
4
index.js
4
index.js
|
@ -1,13 +1,13 @@
|
||||||
module.exports = function ({subject, status, color = '#4C1'}) {
|
module.exports = function ({subject, status, color = '#4C1'}) {
|
||||||
const sbl = subject.length
|
const sbl = subject.length
|
||||||
const stl = status.length
|
const stl = status.length
|
||||||
const charWidth = 7.5
|
const charWidth = 7.4
|
||||||
|
|
||||||
const sbTextWidth = sbl * charWidth
|
const sbTextWidth = sbl * charWidth
|
||||||
const sbRectWidth = sbTextWidth + 12
|
const sbRectWidth = sbTextWidth + 12
|
||||||
const sbTextCenter = sbRectWidth / 2
|
const sbTextCenter = sbRectWidth / 2
|
||||||
|
|
||||||
const stTextWidth = stl * charWidth - 4
|
const stTextWidth = stl * charWidth
|
||||||
const stRectWidth = stTextWidth + 14
|
const stRectWidth = stTextWidth + 14
|
||||||
const stTextCenter = sbRectWidth + stRectWidth / 2
|
const stTextCenter = sbRectWidth + stRectWidth / 2
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"alias": "badgen"
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node service.js",
|
"start": "node service.js",
|
||||||
"deploy": "now -T badgen --public"
|
"deploy": "now -T badgen --public && now -T badgen alias"
|
||||||
},
|
},
|
||||||
"author": "Amio <amio.cn@gmail.com>",
|
"author": "Amio <amio.cn@gmail.com>",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
Ładowanie…
Reference in New Issue