Code Monkey home page Code Monkey logo

copier-copier's Introduction

Copier project template

A Copier template for Copier templates!

Quickstart

To install Copier, please follow the instructions here.

Then, to create a new project based on this template, run:

copier copy --trust 'https://github.com/vivienm/copier-copier' path/to/your/project

and fill in the form.

To update an existing project based on this template, run:

copier update --skip-answered --trust

Project layout

This template uses itself, so it's a bit messy. Here is a quick recap:

  • The nested directory template/template contains common template files for all final projects, no matter the language. Hence, it is relatively empty.
  • The toplevel directory template contains common template files for Copier template projects. It is built upon the templates in the template/template directory.
  • Finally, the root directory . (i.e. this project itself) is built upon the templates in the template directory.

As a consequence, all Jinja-like filenames in the template/template directory should be quoted with {{ '{{' }} ... {{ '}}' }} to avoid being rendered one step too far by Copier in the template directory.

To update the project:

# First, do some changes in the nested common template directory.
vim template/template/some_file
git diff
git commit -am "chore: update some file"
git push

# Then, propagate the change to the toplevel copier template directory.
# Inspect the changes and commit them.
copier update --skip-answered --trust
git diff
git commit -am "chore: propage $(git rev-parse --short HEAD) to copier template"
git push

# Finally, propagate the change to the project itself. Inspect the changes
# and commit them.
copier update --skip-answered --trust
git diff
git commit -am "chore: propage $(git rev-parse --short HEAD) to project"
git push

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.