Skip to content

Commit

Permalink
feat(refactor): whole logic is refactored to new one using commander
Browse files Browse the repository at this point in the history
  • Loading branch information
Stradivario committed Mar 7, 2023
1 parent 99bae53 commit c5c2ec9
Show file tree
Hide file tree
Showing 30 changed files with 444 additions and 468 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This will install local packages referenced inside `fireDependencies`
It means that `node_modules` folder will be already populated with appropriate packages after `npm install`

```bash
firelink --bootstrap --no-runner
firelink --bootstrap --skip-runner
```

Deploying as usual
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
},
"main": "./dist/index.js",
"scripts": {
"build": "npx [email protected] build ./src/main.ts --experimental-scope-hoisting --target node",
"start": "npx gapi start",
"build": "npx parcel build ./src/main.ts --target node",
"build-binary": "npx gapi build --single-executable && mkdir binaries && npm run copy-binaries",
"build-all": "npm run build-binary && rm -rf dist && npm run build",
"test": "npx jest",
Expand Down Expand Up @@ -40,6 +41,7 @@
"jest-cli": "29.2.2",
"prettier": "^2.7.1",
"ts-jest": "29.0.3",
"commander": "^9.0.0",
"typescript": "^4.8.4"
}
}
94 changes: 0 additions & 94 deletions src/create-virtual-symlink.spec.ts

This file was deleted.

80 changes: 0 additions & 80 deletions src/create-virtual-symlink.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/helpers/args-extractors.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/helpers/build-packages.ts

This file was deleted.

18 changes: 18 additions & 0 deletions src/helpers/custom-error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export class CustomError extends Error {
get name(): string {
return this.constructor.name;
}
}

export class ExitCodeError extends CustomError {
readonly code: number;

constructor(code: number, command?: string) {
if (command) {
super(`Command '${command}' exited with code ${code}`);
} else {
super(`Child exited with code ${code}`);
}
this.code = code;
}
}
16 changes: 0 additions & 16 deletions src/helpers/exit-handler.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/helpers/file-exists.ts

This file was deleted.

16 changes: 2 additions & 14 deletions src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
export * from './args-extractors';
export * from './build-packages';
export * from './copy-packages';
export * from './copy-recursive';
export * from './exit-handler';
export * from './file-exists';
export * from './modify-json';
export * from './parse-ignore';
export * from './read-excludes';
export * from './read-json';
export * from './revert-json';
export * from './run-command';
export * from './worker';
export * from './write-file-json';
export * from './custom-error';
export * from './utils.service';
22 changes: 0 additions & 22 deletions src/helpers/modify-json.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/helpers/parse-ignore.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/helpers/read-json.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/helpers/revert-json.ts

This file was deleted.

Loading

0 comments on commit c5c2ec9

Please sign in to comment.