From c036de034bf10c4e345b127b1197d21e3db173a9 Mon Sep 17 00:00:00 2001 From: Yomguithereal Date: Thu, 11 Mar 2021 09:53:38 +0100 Subject: [PATCH] New lifecycle scripts --- package-lock.json | 25 +++++++++++++++++++++++++ package.json | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index dda4fc4..3b90c17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "neo-blessed": "^0.2.0", "prettier": "^2.2.1", "react-devtools-core": "4.10.1", + "rimraf": "^3.0.2", "rollup": "^2.38.5", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", @@ -3925,6 +3926,21 @@ "node": ">=0.12" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rollup": { "version": "2.38.5", "dev": true, @@ -7536,6 +7552,15 @@ "dev": true, "optional": true }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "rollup": { "version": "2.38.5", "dev": true, diff --git a/package.json b/package.json index 8b0823a..83424d7 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,11 @@ "main": "./dist/index.js", "module": "./dist/index.es.js", "scripts": { - "build": "rollup -c", + "build": "npm run clean && rollup -c", + "clean": "rimraf dist", "demo": "node run.js", "prepublish": "npm run build", + "prepublishOnly": "npm run build", "prettier": "prettier --write './**/*.js' './**/*.jsx'", "test": "mocha -R spec --require @babel/register ./test/endpoint.js" }, @@ -46,6 +48,7 @@ "neo-blessed": "^0.2.0", "prettier": "^2.2.1", "react-devtools-core": "4.10.1", + "rimraf": "^3.0.2", "rollup": "^2.38.5", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0",