Skip to content

Commit

Permalink
v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bin-Huang committed Mar 26, 2018
1 parent 61e6ac1 commit 0477ed2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/src/tyty.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const isExist_1 = require("./isExist");
const ora = require("ora");
const install_1 = require("./install");
program
.version("2.2.0")
.version("2.3.0")
.option("-s, --save", "get typescript definitions and add to package.json as a dependency")
.option("-d, --save-dev", "(default) get typescript definitions and add to package.json as a dev-dependency")
.parse(process.argv);
Expand Down Expand Up @@ -60,11 +60,11 @@ function action(install, as) {
}), { concurrency: 10 });
const existTypes = types.filter((t, ix) => checkExistResults[ix]);
const unexistTypes = types.filter((t, ix) => !checkExistResults[ix]);
spinner.text = 'downloading ...';
spinner.text = `downloading ${types.length} typescript definitions ...`;
yield install(existTypes);
// console.log(`\n\n${blue("Result")}:\n`)
getResults(existTypes, true, as).map((r) => spinner.succeed(r));
getResults(unexistTypes, false, as).map((r) => spinner.fail(r));
getResults(existTypes, true, as).map((r) => spinner.succeed(r));
spinner.stop();
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tyty",
"version": "2.2.0",
"version": "2.3.0",
"description": ":star2: A cli tool to get all of `@types/*` for your project dependencies. Happier with `typescript` :heart:",
"main": "./dist/src/tyty.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/tyty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as ora from 'ora'
import { npm, npmDev } from "./install";

program
.version("2.2.0")
.version("2.3.0")
.option("-s, --save", "get typescript definitions and add to package.json as a dependency")
.option("-d, --save-dev", "(default) get typescript definitions and add to package.json as a dev-dependency")
.parse(process.argv);
Expand Down Expand Up @@ -61,11 +61,11 @@ async function action(install: IInstall, as: "dependencies" | "devDependencies"
const existTypes = types.filter((t, ix) => checkExistResults[ix])
const unexistTypes = types.filter((t, ix) => ! checkExistResults[ix])

spinner.text = 'downloading ...'
spinner.text = `downloading ${types.length} typescript definitions ...`
await install(existTypes);
// console.log(`\n\n${blue("Result")}:\n`)
getResults(existTypes, true, as).map((r) => spinner.succeed(r))
getResults(unexistTypes, false, as).map((r) => spinner.fail(r))
getResults(existTypes, true, as).map((r) => spinner.succeed(r))
spinner.stop()
}

Expand Down

0 comments on commit 0477ed2

Please sign in to comment.