From 6ea62278ee7e199a2e070e0f3c6c319bd4ed5cb1 Mon Sep 17 00:00:00 2001 From: Amio Date: Fri, 7 Sep 2018 23:05:00 +0800 Subject: [PATCH] chore: publish bundled badgen.min.js only --- .gitignore | 2 +- .npmignore | 1 + .travis.yml | 2 ++ package-lock.json | 4 ++-- package.json | 5 +++-- test/index.spec.js | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 132cb75..45a2bd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules .nyc_output -dist +badgen.min.js diff --git a/.npmignore b/.npmignore index 48cdaea..8fc3bcf 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,5 @@ .* +lib test bench preview diff --git a/.travis.yml b/.travis.yml index 437ee5d..f423cef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,3 +2,5 @@ language: node_js node_js: - "8" - "10" +before_script: + - "npm run build" diff --git a/package-lock.json b/package-lock.json index bd8db93..d286beb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -962,7 +962,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2246,7 +2246,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { diff --git a/package.json b/package.json index 43aa1d0..b5b3b2e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "amio/badgen", "author": "Amio ", "license": "ISC", - "main": "lib/index.js", + "main": "badgen.min.js", "scripts": { "lint": "standard", "bench": "node bench/index.js", @@ -13,7 +13,8 @@ "snaptests": "TAP_SNAPSHOT=1 npm test", "pretest": "npm run lint", "test": "tap test/*.spec.js --reporter spec --coverage", - "prepublishOnly": "lyo" + "build": "lyo -i lib/index.js -o .", + "prepublishOnly": "npm run build" }, "devDependencies": { "benchmark": "^2.1.4", diff --git a/test/index.spec.js b/test/index.spec.js index a0f271d..210277e 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,5 +1,5 @@ const tap = require('tap') -const badgen = require('..') +const badgen = require('../lib/index.js') const icons = require('./icon-data-uri.js') tap.test('generate badge with { subject, status }', t => {