Code Monkey home page Code Monkey logo

boilerplato's Introduction

Crate Contributors License

boilerplato

A powerful tool to generate boilerplate source code from a template.

Let Boilerplato create your boilerplate source code and you focus on actual app logic.

Visit https://docs.boilerplato.com for more info.

Install

macOS

 $ bash -c "$(curl -fsSL https://boilerplato.com/install.sh)"

Linux

 $ bash -c "$(curl -fsSL https://boilerplato.com/install.sh)"

Windows

Please download it from releases page.

Usage

$ boilerplato <app_name> --template <template_name>

Available templates are hosted on: https://github.com/boilerplato.

Contributing

Your PRs and stars are always welcome.

boilerplato's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

icodein

boilerplato's Issues

Templatize the file structure by binding with template data defined in boilerplato.yml config

As of now, if someone needs to add/remove a file/folder based on user inputs, he/she will have to write scripts for that. To resolve that, we can templatize folder structure based on user inputs defined boilerplato.yml file.

An example:

- files:
  - "src/store": "{{ isReduxIncluded }}"
  - "src/history.js": "{{ isRouterIncluded }}"

the condition will be a handlebars formatted string and whose output will be a truthy value or falsy values and if it is truthy, the file/folder will be processed by the generators otherwise, it will be ignored.

Strange issue regarding local template

It's happening only for local templates.
The /node_modules folder is ignored in .gitignore file, but still we needed to ignore this folder in .boilerplatoignore file otherwise the app is generating the code very slowly.

Steps to replicate:
1. ignore /node_modules in .gitignore file and create an empty .boilerplatoignore file
2. Now generate the app
3. The app will be slow

Workaround
1. Add /node_modules in .boilerplatoignore file as well and the problem will be gone.

Add support custom file/folder creations based on user inputs

As of now, The boilerplato CLI does text substitution, but in some cases, the template developer needs to create some files based on user inputs. In that case, we can add a special directory scripts and add a scripts key in the boilerplato.yml file and inside that dir, the template developer can write any kind of scripts, and the CLI will run those scripts besides the template dir and the app dir.

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.