From 27b24f5786b6e83c80f0a3491d6092d661e1edf1 Mon Sep 17 00:00:00 2001 From: Sergey Zakharchenko Date: Fri, 5 Mar 2021 09:07:26 +0000 Subject: [PATCH 1/2] fix(npm): use prepare script to build package at installation time The intended behaviour is to run the build on any install, including from a git URL. See also: https://github.com/apiaryio/dredd/issues/945 https://github.com/npm/npm/issues/3055 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e5cf6568..884e3e15 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "test-ie": "karma start --browsers=IE --single-run=false --auto-watch=true", "dev": "make dev", "build": "make clean build", + "prepare": "make clean build", "lint": "make lint", "flow": "flow" }, From 5a98c5dfb65331937626ea166368570d8b625858 Mon Sep 17 00:00:00 2001 From: Sergey Zakharchenko Date: Fri, 5 Mar 2021 09:27:34 +0000 Subject: [PATCH 2/2] fix(npm): avoid use of make and yarn at prepare time Inline build instructions from Makefile to avoid dependency on make and yarn. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 884e3e15..3ef578ef 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test-ie": "karma start --browsers=IE --single-run=false --auto-watch=true", "dev": "make dev", "build": "make clean build", - "prepare": "make clean build", + "prepare": "babel --out-dir ./build/cjs ./lib && webpack --mode=production --display-modules", "lint": "make lint", "flow": "flow" },