diff --git a/package.json b/package.json index 0868f0c..056de27 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "snaptests": "TAP_SNAPSHOT=1 npm test", "pretest": "npm run lint && npm run build", "test": "tap test/*.spec.js --reporter spec --coverage", - "build": "ncc -s -m build src/index.js ", + "build": "ncc -s -m build src/index.js && cp src/*.d.ts dist", "prepublishOnly": "npm run build" }, "devDependencies": { diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 0000000..29b4263 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,12 @@ +interface BadgenOptions { + status: string; + subject?: string; + color?: string; + style?: StyleOption; + icon?: string; + iconWidth?: 13; +} + +type StyleOption = 'flat' | 'classic' + +export default function badgen(options: BadgenOptions): string;