From 93c36d2bd40b3f842580fcda790fdb1b5afd3fa4 Mon Sep 17 00:00:00 2001 From: Egor Gorbachev Date: Thu, 19 Sep 2019 15:15:15 +0200 Subject: [PATCH] Modify npm scripts so it's possible to produce ESM build output --- package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2bb47d9..c2aa0a5 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,15 @@ "version": "2.1.0", "description": "YAML plugin for the Monaco Editor", "scripts": { + "watch": "tsc -p ./src --watch", "compile": "rimraf ./out && yarn compile:umd && yarn compile:esm", "compile:umd": "tsc -p ./src/tsconfig.json", "compile:esm": "tsc -p ./src/tsconfig.esm.json", - "watch": "tsc -p ./src --watch", - "prepublish": "rimraf ./out && rimraf ./release && yarn compile:umd && node ./scripts/bundle && mcopy ./src/monaco.d.ts ./release/monaco.d.ts", + "bundle": "rimraf ./release && yarn bundle:umd && yarn bundle:esm", + "bundle:umd": "node ./scripts/bundle && mcopy ./src/monaco.d.ts ./release/monaco.d.ts", + "bundle:esm": "node ./scripts/release", + "build": "yarn compile && yarn bundle", + "prepublish": "yarn build", "lint": "prettier \"{src,test}/**/*.{json,scss,html,ts}\" --write", "test": "jest --verbose" },