Feat: Support macOS and Windows, migrate JavaScript to TypeScript (#32)
- Support macOS and Windows (Close #24 ) - Refactoring - Error handling - TypeScript - Prettier (Close #29 ) - GHA: Add upload-artifact step for test coverage - deps: Install husky
This commit is contained in:
parent
4d54b90c0e
commit
dc8541739a
24 changed files with 924 additions and 168 deletions
12
src/get-os.ts
Normal file
12
src/get-os.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export default function getOS(platform: string) {
|
||||
if (platform === 'linux') {
|
||||
return 'Linux';
|
||||
} else if (platform === 'darwin') {
|
||||
return 'macOS';
|
||||
} else if (platform === 'win32') {
|
||||
return 'Windows';
|
||||
// throw new Error("Windows is not supported");
|
||||
} else {
|
||||
throw new Error(`${platform} is not supported`);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue