Giter Club home page Giter Club logo

pop's Introduction

pop

Overview

A small command line tool to make it easy to template and reuse common files like .gitignore, webpack.config.js, etc... Template files are stored either in $POP_TEMPLATES or $HOME/.pop_templates. It uses Mustache templating to provide some conditional logic to your templates. The plan is to make this a bit more robust in the future.

Note: Your configured $EDITOR environment variable is used when opening template files. If that isn't set, it will use code by default (which may not be installed for all users).

Demo

pop demo

// file: ~/.pop_templates/eslint..eslintrc`
{
  "extends": ["problems", "prettier"],
  "env": {
    {{ #nodeEnv }}
    "node": true
    {{ /nodeEnv }}
  },
  "parserOptions": {
    "ecmaVersion": 2020,
    "sourceType": "module"
  },
  "rules": {
    {{ #consoleOK }}
    "no-console": "off"
    {{ /consoleOK }}
  }
}

Install

It's not published on npm at the moment, so you can do the following to clone the repo and link it globally:

git clone https://github.com/samkcarlile/pop
cd pop
npm install
npm link

Usage

Usage: pop [options] [command]

Options:
  -V, --version                           output the version number
  -h, --help                              display help for command

Commands:
  add <name> [dest]                       copy a template to the current directory
  new|create [options] <name> <filename>  create a new template
  edit|e <name>                           open a template for editing
  remove|rm [options] <name>              delete a template
  rename|mv <name> <newName>              rename a template
  list|ls [type]                          list the available template names
  help [command]                          display help for command

pop's People

Contributors

samkcarlile avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

howaboutjeho

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.