Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Create repository

esdmr edited this page Apr 13, 2022 · 6 revisions

How to create a new repository

Requirements

This template requires Node.JS version 16 minimum. Ensure that you have installed the correct version of Node.JS by running node --version.

This template recommends pnpm version 6. Ensure that you have installed the correct version of pnpm by running pnpm --version.

Creating the repository

Using GitHub

  1. Open the repository.
  2. Press on “Use this template”.
  3. Select the owner and the repository name.
  4. Optionally enter a description.
  5. Select a visibility.
  6. Do not check “Include all branches”.
  7. Press on “Create repository from template”.
  8. Clone: git clone https://github.com/USER/REPO.

Using GitHub CLI (gh)

Run the following command. The repository should automatically be cloned afterwards. USER is the name of the owner and REPO is the name of the repository.

gh repo create USER/REPO --confirm --public \
  --description DESCRIPTION \
  --homepage https://USER.github.io/REPO/ \
  --template esdmr/template

Installing

  1. Change directory: cd REPO.
  2. Install all the dependencies: pnpm install.

Modifying

Automatically

Run node scripts/placeholder.js and fill the placeholders for the script to automatically patch them in all files.

Manually

  • Modify .github/pages-template/_includes/head_custom.html to refer to the correct repository.
  • Modify .github/pages-template/_config.yml to refer to the correct repository.
  • Modify CODE_OF_CONDUCT.md to refer to the correct email address.
  • Modify LICENSE to refer to the correct person.
  • Modify package.json to refer to the correct project name, repository address, and author. Also remove the private declaration.
  • Remove README.md.
  • Rename README.template.md to README.md and modify the content.
  • Modify renovate.json to refer to the correct IANA time zone.
  • Clear src/main.ts.
  • Clear test/main.ts.
  • Delete every file under examples.
  • Delete scripts/placeholder.js.

Committing all the changes

  1. Run git commit -am "Fill template placeholders".
  2. Run git push origin.
Clone this wiki locally