Coder Social home page Coder Social logo

monstar-lab-oss / flutter-bricks Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 212 KB

Flutter project scaffold with Mason CLI for efficient feature creation from bricks. ๐Ÿงฑ

License: MIT License

Dart 100.00%
flutter flutter-bricks flutter-mason mason mason-cli monstarlab-bricks mason-bricks

flutter-bricks's Introduction

Monstarlab Flutter Bricks ๐Ÿงฑ

A collection of useful bricks by Monstarlab.

Installation

Ensure you have the mason_cli installed.

# ๐ŸŽฏ Activate from https://pub.dev
dart pub global activate mason_cli
# ๐Ÿบ Or install from https://brew.sh
brew tap felangel/mason
brew install mason

To ensure that you have mason installed in your system, run mason on your terminal.

mason

You should see something similar.

๐Ÿงฑ  mason โ€ข lay the foundation!
...

Initiate the mason by running the following command:

# Initiate the mason
mason init

This command should create a file named mason.yaml.

In your project include these in mason.yaml.

bricks:
  # service brick
  service:
    git:
      url: "https://github.com/monstar-lab-oss/flutter-bricks.git"
      path: bricks/service

  # usecase brick
  usecase:
    git:
      url: "https://github.com/monstar-lab-oss/flutter-bricks.git"
      path: bricks/usecase

  # feature brick
  feature:
    git:
      url: "https://github.com/monstar-lab-oss/flutter-bricks.git"
      path: bricks/feature

Bricks

Brick Description
service Generate a new service (data and domain)
usecase Generate a new usecase (domain)
feature Generate a new feature (ui, cubits, etc.)

โš ๏ธ You must have Dart 3.0 or up to use new language features.

Usage

If you have mason.yaml in place just run the following commands to start using:

# ๐ŸŽฏ To get all mason bricks from mason.yaml
mason get

Now you are ready to go! Each time you modify this brick.yaml, we need to run this mason get command.

For example, if you want to make a feature in your project โ€”

# ๐Ÿš€ To make a feature from mason brick template
mason make feature

Making a feature GIF


Also, make sure you add these lines to your .gitignore file if you are using git in your project.

# Local Mason Files
.mason/
mason-lock.json

flutter-bricks's People

Contributors

utpal-barman avatar

Stargazers

 avatar  avatar

Watchers

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