kopia lustrzana https://github.com/badgen/badgen
test: update test config
rodzic
2d37d4f0c2
commit
997fcb6740
|
@ -16,7 +16,7 @@ Fast handcraft svg badge generator. Used on [badgen.net](https://badgen.net).
|
|||
`npm install badgen`
|
||||
|
||||
```javascript
|
||||
const badgen = require('badgen')
|
||||
const { badgen } = require('badgen')
|
||||
|
||||
// only `status` is required.
|
||||
const svgString = badgen({
|
||||
|
|
|
@ -127,6 +127,12 @@
|
|||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.7.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.9.tgz",
|
||||
"integrity": "sha512-P57oKTJ/vYivL2BCfxCC5tQjlS8qW31pbOL6qt99Yrjm95YdHgNZwjrTTjMBh+C2/y6PXIX4oz253+jUzxKKfQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@zeit/ncc": {
|
||||
"version": "0.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz",
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"lint": "standard src/*.js",
|
||||
"bench": "node bench/index.js",
|
||||
"preview": "node preview/serve.js",
|
||||
"snaptests": "TAP_SNAPSHOT=1 npm test",
|
||||
"pretest": "npm run lint && npm run build",
|
||||
"test": "tap test/*.spec.js --reporter spec --coverage",
|
||||
"pretest": "npm run build",
|
||||
"test": "tap test/*.spec.js",
|
||||
"prebuild": "rm -rf dist",
|
||||
"build": "ncc -s -m --no-source-map-register build src/index.ts",
|
||||
"prepublishOnly": "npm run build"
|
||||
"prepack": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.7.9",
|
||||
"@zeit/ncc": "^0.20.5",
|
||||
"benchmark": "^2.1.4",
|
||||
"serve-marked": "^2.0.2",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export { Verdana110 as calcWidth } from './calc-text-width'
|
||||
import { Verdana110 as calcWidth } from './calc-text-width'
|
||||
import colorPresets from './color-presets'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const tap = require('tap')
|
||||
const calcWidth = require('../src/calc-text-width.js').Verdana110
|
||||
const calcWidth = require('../dist').calcWidth
|
||||
|
||||
tap.test('basic functions', t => {
|
||||
t.ok(typeof calcWidth === 'function', 'export calcWidth function')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const tap = require('tap')
|
||||
const badgen = require('../src/index.js')
|
||||
const { badgen } = require('../dist/index.js')
|
||||
const icons = require('./assets/icon-data-uri.js')
|
||||
|
||||
tap.test('generate badge with { label, status }', t => {
|
||||
|
|
Ładowanie…
Reference in New Issue