From aa3b85314d5ccaa7b4368de4e82f20a38be7fbca Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 12 Feb 2017 16:04:27 +0100 Subject: [PATCH] added speedtest --- dist/npmdocker.cli.js | 11 +++++++++-- package.json | 3 ++- ts/npmdocker.cli.ts | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/dist/npmdocker.cli.js b/dist/npmdocker.cli.js index d452590..b3956de 100644 --- a/dist/npmdocker.cli.js +++ b/dist/npmdocker.cli.js @@ -33,10 +33,17 @@ exports.run = () => { plugins.beautylog.ora.text('removing images...'); plugins.shelljs.exec(`docker rmi $(docker images -q -f dangling=true)`); plugins.beautylog.ora.text('removing all other images...'); - plugins.shelljs.exec(`docker rmi $(docker images -q)`); + plugins.shelljs.exec(`docker rmi $(docker images -a -q)`); + plugins.beautylog.ora.text('removing all volumes...'); + plugins.shelljs.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`); } plugins.beautylog.ora.endOk('docker environment now is clean!'); }); + npmdockerCli.addCommand('speedtest').then(argvArg => { + plugins.beautylog.ora.text('cleaning up docker env...'); + plugins.shelljs.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`); + plugins.beautylog.ora.endOk('docker environment now is clean!'); + }); npmdockerCli.startParse(); }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNsaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWRvY2tlci5jbGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUE4QztBQUc5QyxVQUFVO0FBQ1YsbURBQWtEO0FBQ2xELG1EQUFrRDtBQUVsRCxJQUFJLFlBQVksR0FBRyxJQUFJLE9BQU8sQ0FBQyxRQUFRLENBQUMsUUFBUSxFQUFFLENBQUE7QUFFbEQsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsS0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yxDQUFBO0lBQ2pFLENBQUMsQ0FBQyxDQUFBO0lBRUYsWUFBWSxDQUFDLFVBQVUsQ0FBQyxXQUFXLENBQUMsQ0FBQyxJQUFJLENBQUMsT0FBTztRQUMvQyxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsMkJBQTJCLENBQUMsQ0FBQTtRQUN2RCxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxrRUFBa0UsQ0FBQyxDQUFBO1FBQ3hGLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFBO0lBQ2pFLENBQUMsQ0FBQyxDQUFBO0lBRUYsWUFBWSxDQUFDLFVBQVUsRUFBRSxDQUFBO0FBQzNCLENBQUMsQ0FBQSJ9 \ No newline at end of file diff --git a/package.json b/package.json index 96ef385..143e00f 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,9 @@ "test": "test" }, "scripts": { - "test": "(npm run clean && npm run compile && npm run setupCheck && npm run testStandard && npm run testClean)", + "test": "(npm run clean && npm run compile && npm run setupCheck && npm run testStandard && npm run testSpeed && npm run testClean)", "testStandard": "(cd test/ && node ../dist/index.js)", + "testSpeed": "(cd test/ && node ../dist/index.js speedtest)", "testClean": "(cd test/ && node ../dist/index.js clean --all)", "clean": "(rm -rf test/)", "compile": "(npmts --notest)", diff --git a/ts/npmdocker.cli.ts b/ts/npmdocker.cli.ts index 8114eab..b24a770 100644 --- a/ts/npmdocker.cli.ts +++ b/ts/npmdocker.cli.ts @@ -47,5 +47,11 @@ export let run = () => { plugins.beautylog.ora.endOk('docker environment now is clean!') }) + npmdockerCli.addCommand('speedtest').then(argvArg => { + plugins.beautylog.ora.text('cleaning up docker env...') + plugins.shelljs.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`) + plugins.beautylog.ora.endOk('docker environment now is clean!') + }) + npmdockerCli.startParse() }