GithubHelp home page GithubHelp logo

new's Introduction

new -- creates one or more new files and/or directories based on a
       collection of templates (e.g. C++ class files, C++ project)

Templates are stored in sub-directories of ~/.new as one or more m4
templates.  A template can have a shell script named "install" that,
if present, is executed after all files have been generated.

The directory structure of the m4 files is preserved when files are
generated except that all instances of the word name are replaced
with what the user typed in for the NAME argument.

m4 receives the following parameters when generating a file:

  name - what the user typed in for the NAME argument
 
  directory - the basename of the directory that the new thing is
              being created in.

A template directory can contain a file named "questions" that
contains multiple lines of the following format:

  variable:question:default

variable - is the name of a variable found in one or more of the m4
templates

question - is a question to ask the user in order to obtain a value
for the variable

default - is the default value of the variable if the user does not
supply a value

Example questions file:

  name_space:Enter a namespace:none
  version:Enter vesion:1.0

It's important that the questions file end with a new line so that
all questions get asked of the user.

new's People

Contributors

timjstewart avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.