Files
triggerdotdev--trigger.dev/packages/cli/src/utils/parseNameAndPath.ts
T
nicktrn 9df93d0798 CLI create-integration templates and shared configs (#511)
* Add tsup config package

* Add integration tsconfig to extend from

* Return correct version via cli -v

* Make create-integration use templates

* Add changeset

* Switch to liquidjs templates

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-13 16:55:22 +01:00

12 lines
440 B
TypeScript

import pathModule from "path";
// Takes a relative path (like .) and resolves it to a full path (like /Users/username/Projects/my-triggers)
export const resolvePath = (input: string) => {
return pathModule.resolve(process.cwd(), input);
};
// Takes an absolute path and derives the relative path from the current working directory
export const relativePath = (input: string) => {
return pathModule.relative(process.cwd(), input);
};