From d0a3def4417c6eefd66f1d1c101ccbf68b9b5748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20M=C3=A6tzke=20Tandrup?= Date: Mon, 27 Jul 2015 11:02:38 +0200 Subject: [PATCH] Adding `npm run clean` command to clean the sample dir --- samples/client/petstore/typescript-angular/README.md | 5 +++++ samples/client/petstore/typescript-angular/package.json | 5 +++-- samples/client/petstore/typescript-node/README.md | 6 ++++++ samples/client/petstore/typescript-node/package.json | 5 +++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/typescript-angular/README.md b/samples/client/petstore/typescript-angular/README.md index ba2e8d1ef85..3a4e49be9e8 100644 --- a/samples/client/petstore/typescript-angular/README.md +++ b/samples/client/petstore/typescript-angular/README.md @@ -9,6 +9,11 @@ npm install npm test ``` +To clean the workspace run: +``` +npm run clean +``` + ## Author mads@maetzke-tandrup.dk \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular/package.json b/samples/client/petstore/typescript-angular/package.json index 1d5568b1db5..f50b782c09f 100644 --- a/samples/client/petstore/typescript-angular/package.json +++ b/samples/client/petstore/typescript-angular/package.json @@ -4,8 +4,9 @@ "description": "Sample of generated TypeScript petstore client", "main": "api.js", "scripts": { - "postinstall": "tsd reinstall", - "test": "tsc" + "postinstall": "tsd reinstall --overwrite", + "test": "tsc", + "clean": "rm -Rf node_modules/ typings/ *.js" }, "author": "Mads M. Tandrup", "license": "Apache 2.0", diff --git a/samples/client/petstore/typescript-node/README.md b/samples/client/petstore/typescript-node/README.md index 10cd4ff7661..82225d3260a 100644 --- a/samples/client/petstore/typescript-node/README.md +++ b/samples/client/petstore/typescript-node/README.md @@ -11,6 +11,12 @@ npm test This will compile the code and run a small test application that will do some simple test calls to the Swagger Petstore API. +To clean the workspace run: +``` +npm run clean +``` + + ## Author mads@maetzke-tandrup.dk \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/package.json b/samples/client/petstore/typescript-node/package.json index 8cca4d04841..ee598dcc6c2 100644 --- a/samples/client/petstore/typescript-node/package.json +++ b/samples/client/petstore/typescript-node/package.json @@ -4,8 +4,9 @@ "description": "Sample of generated TypeScript petstore client", "main": "api.js", "scripts": { - "postinstall": "tsd reinstall", - "test": "tsc && node client.js" + "postinstall": "tsd reinstall --overwrite", + "test": "tsc && node client.js", + "clean": "rm -Rf node_modules/ typings/ *.js" }, "author": "Mads M. Tandrup", "license": "Apache 2.0",