GithubHelp home page GithubHelp logo

blueprint's Introduction

Blueprint CLI: Streamline Your Code Generation Workflow

Introduction

The Blueprint CLI empowers you to automate repetitive code generation tasks, promoting efficiency and consistency within your development processes. It leverages Plop (https://plopjs.com/) to provide a flexible framework for building reusable blueprints that generate files, configurations, and other project elements based on your defined logic.

Features

  • Blueprint Creation: Use the create-blueprint blueprint to quickly establish the foundation for your custom blueprints, leveraging Plop's functionality.
  • Customizable Blueprints: Tailor Plopfile.ts logic within your custom blueprints to define prompts, actions, and custom logic for generating the desired code, files, and configurations.
  • Modular Structure: The Blueprint CLI promotes well-organized project structures and simplifies code maintainability.
  • Flexibility: Create blueprints for a wide range of use cases, from generating basic components to setting up complex project configurations.

Getting Started

Prerequisites

  • Ensure you have Node.js and npm (or yarn) installed on your system.

Installation

  1. Clone this repository:

    git clone [https://github.com/your-username/your-blueprint-cli-repo.git](https://github.com/your-username/your-blueprint-cli-repo.git)
cd your-blueprint-cli-repo
  ```
3.
```bash
npm install

Using the CLI

Creating a Custom Blueprint:

Execute the create-blueprint command to generate the initial structure for your blueprint: ```Bash

npx bp create-blueprint
```

Follow the prompts to provide a name and description for your blueprint.

Edit the generated Plopfile.ts file to define the custom logic for your blueprint using prompts, actions, and conditional statements.

Additional Blueprints (Optional):

You can create additional custom blueprints using the same principles as the create-blueprint blueprint:
  • Create a new directory within the blueprints directory for your custom blueprint.
  • Inside this directory, create a Plopfile.ts file to define your blueprint's logic.
  • Optionally, include a README.md file to provide documentation specific to your custom blueprint.

Using Custom Blueprints:

Assuming your custom blueprint is named my-blueprint, you can use it within your project directory:
Bash

npx bp use my-blueprint

Use code with caution.

Follow the prompts specific to your custom blueprint.

Testing and Contributing

Consider incorporating a testing framework like Jest to write unit tests for your Blueprint CLI's core functionalities and custom blueprint logic, ensuring robustness.
Explore tools like DocuSource for creating detailed and interactive documentation to guide users in building and utilizing custom blueprints effectively.

Contributing

We welcome contributions to this project! Feel free to submit pull requests that improve existing functionalities, add new features, or fix bugs. Refer to the CONTRIBUTING.md file (if available) for specific guidelines.

License

This project is distributed under the MIT License.

blueprint's People

Contributors

steveemmerich avatar

Watchers

 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.