From 8c91a36e9498d68ad8bd0eee0752376146eae6b0 Mon Sep 17 00:00:00 2001 From: Lorenzo Iovino Date: Tue, 5 Feb 2019 10:59:07 +0100 Subject: [PATCH] Feat: prepublish script added in package.json. Fix: at end of publish need to remove dist folder --- .idea/workspace.xml | 17 ++++++++--------- package.json | 4 +++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index cea2413..83dbf37 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,7 +5,6 @@ - @@ -92,13 +91,13 @@ - + - + @@ -140,8 +139,8 @@ - - + + @@ -389,12 +388,12 @@ - + - @@ -595,8 +594,8 @@ - - + + diff --git a/package.json b/package.json index d60efe1..d0a2bae 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "scripts": { "transpile": "ngc", "build": "npm run transpile", - "publish": "npm run build && cp publishPackage.json ./dist/package.json && cp README.md ./dist/README.md && cd dist && npm publish --access=public" + "test": "ng test", + "prepublish": "npm run test", + "publish": "npm run build && cp publishPackage.json ./dist/package.json && cp README.md ./dist/README.md && cd dist && npm publish --access=public && rm -rf ./dist" }, "keywords": [], "author": "Lorenzo Iovino",