From 74771deab97d8bb835c9dec70fcd05f143ee0a19 Mon Sep 17 00:00:00 2001 From: Neelesh Roy Date: Fri, 11 May 2018 21:56:31 +0530 Subject: [PATCH] publish function --- package.json | 3 ++- tools/build.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 88117f3..6b6fc9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sorting-javascript", - "version": "1.0.1", + "version": "1.0.2", "description": "Sorting algorithms implemented in JS", "repository": "neeleshroy/sorting-js", "author": "Neelesh Roy", @@ -57,6 +57,7 @@ "coveralls": "cat ./coverage/lcov.info | coveralls", "build": "node tools/build", "prepublish": "npm run build", + "publish": "npm run build && npm publish dist", "publish:docs": "easystatic deploy docs --repo neeleshroy/sorting-js", "start": "easystatic start docs" } diff --git a/tools/build.js b/tools/build.js index 23f6b42..4864ba5 100644 --- a/tools/build.js +++ b/tools/build.js @@ -48,6 +48,7 @@ promise = promise.then(() => { delete pkg.babel; fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, ' '), 'utf-8'); fs.writeFileSync('dist/LICENSE.txt', fs.readFileSync('LICENSE.txt', 'utf-8'), 'utf-8'); + fs.writeFileSync('dist/README.md', fs.readFileSync('README.md', 'utf-8'), 'utf-8'); }); promise.catch(err => console.error(err.stack)); // eslint-disable-line no-console