Tools which allow developers to create and consume reusable templates called bricks.
Published by felangel about 3 years ago
Published by felangel about 3 years ago
mason install
and mason uninstall
mason install
-> mason add -g
mason uninstall
-> mason remove -g
mason init
generated mason.yaml
mason list
empty outputmason remove
commandmason add
commandmason init
command automatically gets first brickmason get
commandPublished by felangel about 3 years ago
dart:io
platform dependencyPublished by felangel about 3 years ago
Published by felangel about 3 years ago
vars
in brick.yaml
are not requiredPublished by felangel about 3 years ago
mason bundle
resolves implicit_dynamic_map_literal
in generated Dart bundlePublished by felangel over 3 years ago
mason bundle
add .otf
support.Published by felangel over 3 years ago
By default, mason make
will prompt on each file conflict and will allow users to specify how the conflict should be resolved via Yna
:
Y - overwrite (default)
n - do not overwrite
a - overwrite this and all others
A custom file conflict resolution strategy can be specified via the --on-conflict
option:
# Always prompt when there is a file conflict (default)
$ mason make hello --name Felix --on-conflict prompt
# Always overwrite when there is a file conflict
$ mason make hello --name Felix --on-conflict overwrite
# Always skip when there is a file conflict
$ mason make hello --name Felix --on-conflict skip
Published by felangel over 3 years ago
feat: support partials
Example:
├── HELLO.md
├── {{~ footer.md }}
└── {{~ header.md }}
{{~ header.md }}
# 🧱 {{name}}
{{~ footer.md }}
_made with 💖 by mason_
HELLO.md
{{> header.md }}
Hello {{name}}!
{{> footer.md }}
$ mason make hello --name Dash
HELLO.md
# 🧱 Dash
Hello Dash!
_made with 💖 by mason_
Published by felangel over 3 years ago
fix: improve mason make --help
to show complete usage information
Generate code using an existing brick template.
Usage: mason make [arguments]
-h, --help Print this usage information.
-c, --config-path Path to config json file containing variables.
-o, --output-dir Directory where to output the generated code.
(defaults to ".")
Run "mason help" to see global options.
Published by felangel over 3 years ago
OverwriteRule
for file conflict resolution (Yna
)
Y
- overwrite (default)n
- do not overwritea
- overwrite this and all othersPublished by felangel over 3 years ago
Published by felangel over 3 years ago
mason make
to support custom output directory via --output-dir
(-o
)mason bundle --directory
(-d
) to mason bundle --output-dir
(-o
)mason make --json
(-j
) to mason make --config-path
(-c
)Published by felangel over 3 years ago
--force
from mason cache clear
mason cache clear
will remove all local bricks so --force
is not necessarymason cache clear
behavior to always clear local and global brick cachesmason list
duplicate bricksMasonCache
to BricksJson
Published by felangel over 3 years ago
mason list
commandPublished by felangel over 3 years ago
mason uninstall
commandPublished by felangel over 3 years ago
mason cache clear --force
target directory to avoid deleting local filesPublished by felangel over 3 years ago
mason get
no longer supports --force
since it is handled automaticallyPublished by felangel over 3 years ago
Published by felangel over 3 years ago
mason get --force