@henrotaym/scaffolding-utils
v1.2.1
Published
Utils for scaffolding projects.
Downloads
50
Readme
Scaffolding boilerplate utils
Installation
yarn add @henrotaym/scaffolding-utils -D
Usage
src/index.ts
#!/usr/bin/env node
import {
useCommandName,
useCurrentPath,
usePackageStubsPath,
useGenerator,
usePrompt
} from "@henrotaym/scaffolding-utils";
// Defining script
export const useMyScript = () => {
const useStubsPath = usePackageStubsPath("@henrotaym/my-current-package");
const generator = useGenerator({
name: usePrompt("your name"),
lastName: usePrompt("your last name")
})
generator.copy(
useStubsPath("devops"),
useCurrentPath("devops")
);
}
Build dist directory
./cli yarn build
bin/myDevops
#!/usr/bin/env node
const { useMyScript } = require("../dist");
useMyScript();
Test your script
./cli node ./bin/myDevops