tsp-temp
v0.0.4
Published
A cli tool to create a template from git repository
Maintainers
Readme
tsp-temp
tsp-temp is a cli tool to extract a template/folder from a git repository.
Usage
with npm
npx tsp-temp <project-name>with pnpm
pnpm dlx tsp-temp <project-name>with yarn
yarn dlx tsp-temp <project-name>Options
version
Option:
--versionAlias:-vType:booleanShows version of the toolhelp
Option:
--helpAlias:-hType:booleanShows help menupackage-manager
Option:
--package-managerAlias:-PType:stringProvide package manager to work with (Currently supportsnpm,pnpm,yarn)template
Option:
--templateAlias:-tType:stringProvide a template path on basis of which new project should be created Available templates: |Template options|Template Description| |-|-| |nextjs|Next.Js| |react-router-v7|React Router V7 (framework mode)| |vanila-ts|Vanila TS|template-source
Option:
--template-sourceType:stringDefault:https://github.com/nirvikpurkait/tsp-tempProvide a local or remote repository of template to use.template-branch
Option:
--template-branchType:stringDefault:mainProvide repository branch to generate from. (Only use it with remote repository on GitHub and GitLab template)skip-install
Option:
--skip-installType:booleanDefault:falseSkips installation of dependenciesexpensive-way
Option:
--expensive-wayType:booleanDefault:falseCreates template in an expensive way, if the provided remote source is not supported by cli. (It might fail as well. Providing support for other remote source is under way)
Project structure
Template - All templates are at
templates/*each template name should be onkebab-caseCLI-Tool - All cli-tool related source is on
scripts/bin/*Workflow - Workflow related scripts on
scripts/workflows/*(as I am much more comfortable on JS/TS rather thanyaml's complex process)Git Hook - Git hook related scripts on
scripts/hooks/*(as I am much more comfortable on JS/TS rather thanbashorpowershellscript's complex process)
Adding new template
You are free to add any template for yourself and others too.
Before adding any new template test the template locally, to ensure it works or not.
Case convention
| Case | Example | Case | Example |
| :----------- | :---------------- | :--------------- | ----------------- |
| kebab-case | case-convention | CaseConvention | PascalCase |
| camelCase | caseConvention | snake_case | case_convention |
