Giter VIP home page Giter VIP logo

lein-templater's Introduction

lein-templater

A Leiningen for automatically generating a Leiningen from a previously existing project. Woah! That's some meta shit! Why didn't you think of a cooler name? Sorry, I figured templating was annoying enough already...

Usage

Leiningen (via Clojars)

Put one of the following into the :plugins vector of the :user profile in your ~/.lein/profiles.clj:

[lein-ancient "0.1.1-SNAPSHOT"]

Make Templates

lein templater will generate a new template that will render all of the files in your current project (excluding those that are gitignored) into their appropriate directories, with your project's name properly replaced.

lein-tempater looks for a an optional :template key in project.clj.

Below is a list of understood keys

{;; the template's title to be used with lein new. defaults to same as project
 :title "project-title"
 ;; the relative path where the template will be generated. defaults to lein-template
 :output-dir "lein-template"
 ;; the version number of your current template. defaults to same as project
 :version "0.1.0-SNAPSHOT"
 ;; a msg to be output when someone uses your template
 :msg "Making a new template based on my-template!"
 ;; the relative path to a file that will serve as the template's
 ;; (not the readme of a project generated from the template)
 :readme "resources/README.template.md"
 ;; same as readme
 :license "resources/LICENSE"
 ;; a map of relative files and paths with which to override them.
 ;; A path of nil will exclude the file.
 :file-overrides {"README.md" "resources/README.new.md"
                  "something_to_exclude.clj" nil}
 }

to test if you're template actually works

cd lein-template
lein install

add the template into the :plugins vector of the :user profile in your ~/.lein/profiles.clj.

lein new my-template test-project

and try it out.

License

Copyright © 2014 Dylan Butman

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

lein-templater's People

Contributors

pleasetrythisathome avatar

Stargazers

johann bestowrous avatar Arnout Roemers avatar Baptiste Fontaine avatar Nils Grünwald avatar  avatar Bobby Calderwood avatar John Walker avatar Daniel Jomphe avatar

Watchers

James Cloos avatar  avatar

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.