Skip to content

Commit

Permalink
chore(info): add typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvdutt committed Jun 21, 2018
1 parent fe25465 commit ca133ab
Show file tree
Hide file tree
Showing 8 changed files with 357 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"test": "nyc jest",
"travis:integration": "npm run test && npm run reportCoverage",
"travis:lint": "lerna bootstrap && npm run lint && npm run bundlesize",
"tslint": "tslint -c tslint.json \"{packages}/**/!(node_modules)/*.ts\"",
"tslint": "tslint -c tslint.json \"packages/**/*.ts\"",
"watch": "tsc -w"
},
"lint-staged": {
Expand Down
1 change: 1 addition & 0 deletions packages/info/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.js
2 changes: 2 additions & 0 deletions packages/info/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.ts
tsconfig.json
14 changes: 6 additions & 8 deletions packages/info/index.js → packages/info/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
"use strict";

const envinfo = require("envinfo");
import envinfo from "envinfo";

/**
* Prints debugging information for webpack issue reporting
*/

module.exports = async function info() {
export default async function info() {
console.log(
await envinfo.run({
System: ["OS", "CPU"],
Binaries: ["Node", "Yarn", "npm"],
Browsers: ["Chrome", "Firefox", "Safari"],
System: ["OS", "CPU"],
npmGlobalPackages: ["webpack", "webpack-cli"],
npmPackages: "*webpack*",
npmGlobalPackages: ["webpack", "webpack-cli"]
})
}),
);
};
}
335 changes: 334 additions & 1 deletion packages/info/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/info/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
},
"dependencies": {
"envinfo": "^5.7.0"
},
"devDependencies": {
"typescript": "^2.9.2"
}
}
3 changes: 3 additions & 0 deletions packages/info/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.json"
}
Loading

0 comments on commit ca133ab

Please sign in to comment.