Git Product home page Git Product logo

update-template's Introduction

๐Ÿ“  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 โ†’

update-template's People

Contributors

anandchowdhary avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

update-template's Issues

Local templates and multiple templates

Hi! I've forked this repo and made some changes to support our workflow, including local templates, applying multiple templates, additional package.json keys supported, and removing dependencies etc that are no longer in the template when a template is upgraded.

Are you interested in evolving this package like this? My fork is at https://github.com/karlvr/update-template. If you are, please take a look and I'd love to discuss making a PR with you. The changes are many and varied so I didn't want to jump in with a PR!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.