Skip to content

Latest commit

 

History

History
88 lines (73 loc) · 1.81 KB

File metadata and controls

88 lines (73 loc) · 1.81 KB

grumpy_bricks

Hook-driven Mason bricks and shared generation logic for Grumpy projects.

Available Bricks

  • unit
  • module
  • service
  • datasource
  • guard
  • middleware
  • screen
  • component
  • repository
  • model

Installation

Install Mason CLI if needed:

dart pub global activate mason_cli

To use the bricks from this repository, create a mason.yaml with the following contents:

bricks:
  unit:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_unit
  module:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_module
  service:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_service
  datasource:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_datasource
  guard:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_guard
  middleware:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_middleware
  screen:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_screen
  component:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_component
  repository:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_repository
  model:
    git:
      url: https://github.com/necodeIT/grumpy_bricks
      path: bricks/grumpy_model

Then fetch the bricks:

mason get

Each brick is pulled from the GitHub repository and resolved from its directory within the repo.

Usage

Generate a brick by name and pass the required name variable:

mason make screen --name login

All bricks use the shared Grumpy generation hooks included in this repository.