This is where I keep various reusable utility classes for my typescript projects. Some are more robust than others.
-
In
path_helper.ts
: a class calledAbsPath
, which is somewhat inspired by ruby'sPathname
. For examples of how to use it, check out the unit test (src/__tests__/path_helper.test.ts
). Note that (at least at the moment) all operations are synchronous. -
In
git_logic.ts
: a class calledGitLogic
which has methods for executing various git operations. no unit test for this one at this point. -
In
mock_fs_helper.ts
:MockFSHelper
- a utility that simplifies copying files from the real filesystem into the mocked filesystem. Quite useful for fixing tschaub/mock-fs#213