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

๐Ÿ“  Easily update repos created with GitHub templates

License

Notifications You must be signed in to change notification settings

AnandChowdhary/update-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“  Update Template

If you've created a repository using a template (see Creating a repository from a template on GitHub), it can be hard to "update" the template when new features are added, since it's not a fork. This package fixes that.

Node CI

โญ Get started

For repositories

If your repo is based on a template, you can update it using the URL of the original template repo:

npx update-template https://github.com/user/repo

For templates

If you're building a template repository, add update-template as a dependency:

npm install update-template

Then, create a .templaterc.json file with a list of files you'd like to overwrite:

{
  "files": ["src/**/*.js"]
}

Lastly, add an update script to your package.json with the URL of your repository:

{
  "scripts": {
    "update-template": "update-template https://github.com/user/repo"
  }
}

When users want to update your template, they can run npm run update-template

If you want to sync your package.json and package-lock.json dependencies (without changing keys like the package name), you can add:

{
  "npmDependencies": true
}

Similarly, npm scripts can be added:

{
  "npmScripts": true
}

๐Ÿ‘ฉโ€๐Ÿ’ป Development

Build TypeScript:

npm run build

๐Ÿ“„ License

MIT ยฉ Koj

Koj

An open source project by Koj.
Furnish your home in style, for as low as CHF175/month โ†’