Skip to content

Commit ca133ab

Browse files
committed
chore(info): add typescript support
1 parent fe25465 commit ca133ab

8 files changed

Lines changed: 357 additions & 11 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"test": "nyc jest",
4343
"travis:integration": "npm run test && npm run reportCoverage",
4444
"travis:lint": "lerna bootstrap && npm run lint && npm run bundlesize",
45-
"tslint": "tslint -c tslint.json \"{packages}/**/!(node_modules)/*.ts\"",
45+
"tslint": "tslint -c tslint.json \"packages/**/*.ts\"",
4646
"watch": "tsc -w"
4747
},
4848
"lint-staged": {

packages/info/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.js

packages/info/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.ts
2+
tsconfig.json
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
"use strict";
2-
3-
const envinfo = require("envinfo");
1+
import envinfo from "envinfo";
42

53
/**
64
* Prints debugging information for webpack issue reporting
75
*/
86

9-
module.exports = async function info() {
7+
export default async function info() {
108
console.log(
119
await envinfo.run({
12-
System: ["OS", "CPU"],
1310
Binaries: ["Node", "Yarn", "npm"],
1411
Browsers: ["Chrome", "Firefox", "Safari"],
12+
System: ["OS", "CPU"],
13+
npmGlobalPackages: ["webpack", "webpack-cli"],
1514
npmPackages: "*webpack*",
16-
npmGlobalPackages: ["webpack", "webpack-cli"]
17-
})
15+
}),
1816
);
19-
};
17+
}

packages/info/package-lock.json

Lines changed: 334 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/info/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
},
1111
"dependencies": {
1212
"envinfo": "^5.7.0"
13+
},
14+
"devDependencies": {
15+
"typescript": "^2.9.2"
1316
}
1417
}

packages/info/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../tsconfig.json"
3+
}

0 commit comments

Comments
 (0)