1.5.3 • Published 2 years ago

copy-github-directory v1.5.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

copy-github-directory

Test codecov

Get a Github directory quickly by a simple command.

Usage

Install

You don't need to install it.

npx copy-github-directory <url> [directory]

Just use it with npx command.

But, if you install (npm install -g copy-github-directory), you can get the short command ghcopy instead of copy-github-directory.

Command

npx copy-github-directory https://github.com/rocket-hangar/workspace-template
# It will be made `workspace-template` directory on your current location

npx copy-github-directory https://github.com/rocket-hangar/workspace-template project
# It will be made `project` directory on your current location

npx copy-github-directory https://github.com/rocket-hangar/workspace-template .
# It will be made files on your current location

Workspaces

If you use it in a yarn workspaces. (If there are exists yarn.lock and workspaces property on package.json)

It adds workspaces information to package.json files.

For example,

cd my-monorepo
npx copy-github-directory https://github.com/rocket-hangar/templates/tree/main/web project

It will write package.json files like below.

// $PWD/package.json
{
  "workspaces": ["project"]
}
// $PWD/project/package.json
{
  "name": "project"
}

If you don't want to modify package.json files use the option --no-workspace <url>.

Alias

If you have URLs that you use frequently, you can give them aliases.

Make .ghcopy.json file on your home directory like below. ($HOME/.ghcopy.json)

{
  "alias": {
    "workspace": "https://github.com/rocket-hangar/workspace-template",
    "web": "https://github.com/rocket-hangar/templates/tree/main/web",
    "packages": "https://github.com/rocket-hangar/templates/tree/main/packages"
  }
}

Then you can use command with the alias.

copy-github-directory web my-web-project

Pre-configured alias

  • workspace: https://github.com/rocket-hangar/workspace-template yarn berry based workspace template
  • web: https://github.com/rocket-hangar/templates/tree/main/web vite.js based web app template
  • packages: https://github.com/rocket-hangar/templates/tree/main/packages rocket-punch based multi-package template
1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.1

3 years ago

1.4.0-alpha.2

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.4.0-alpha.1

3 years ago

1.3.0

3 years ago