Skip to content

Streamline Flutter project setup and expansion with Mason Bricks: a collection of reusable templates and generators for efficient code scaffolding

Notifications You must be signed in to change notification settings

shyamexe/bricks-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mason bricks 🧱

Mason reusable bricks for efficient project scaffolding.

Getting started 🚀

Adding a brick 🧱️

To add a brick, you have a few options:

# 🎯 Activate Mason CLI (if not done already):

dart pub global activate mason_cli
# Add a brick from a Git URL:

mason add <BRICK_NAME> --git-url https://github.com/shyamexe/bricks-cli --git-path path/to/<BRICK_NAME>
# Add a brick globally from a Git URL:

mason add -g <BRICK_NAME> --git-url https://github.com/shyamexe/bricks-cli --git-path path/to/<BRICK_NAME>
# For instance, to add the flutter-package brick:

mason add -g flutter-template --git-url https://github.com/shyamexe/bricks --git-path flutter-template

Available Bricks ✨

name description
flutter-package Create a new Flutter project with basic structure
bloc Generate a new Bloc
cubit Generate a new Cubit
feature-block Generate a new module block

flutter-template Brick Installation

# Add flutter-template from GitHub
mason add -g flutter-template --git-url https://github.com/shyamexe/bricks --git-path flutter-template

# List all globally installed bricks
mason ls -g

# Generate code using the brick
mason make flutter-template

# Remove the brick (global)
mason remove -g flutter-template

bloc/cubit Installation

# Globally add cubit brick from GitHub
mason add -g cubit --git-url https://github.com/shyamexe/bricks --git-path cubit

# Generate a new Cubit
mason make cubit --name counter --style equatable

To load the brick inside your project:

1 Create mason/mason.yaml in your project root:

bricks:
  cubit:
    git:
      url: https://github.com/shyamexe/bricks-cli.git
      path: cubit

2 Run the following commands:

mason get

mason make cubit -o ..\Yoru\output\folder\  --name counter --style equatable

About

Streamline Flutter project setup and expansion with Mason Bricks: a collection of reusable templates and generators for efficient code scaffolding

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published