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.
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
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
}
Build TypeScript:
npm run build
An open source project by Koj.
Furnish your home in style, for as low as CHF175/month โ