-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from yumemi-inc/feature/improve_bricks
featureを追加するbrickでriverpodやfreezedの依存を追加できるようにした
- Loading branch information
Showing
29 changed files
with
215 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# 0.1.0 | ||
# 0.1.0+1 | ||
|
||
- TODO: Describe initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:mason/mason.dart'; | ||
|
||
void run(HookContext context) { | ||
final featureName = context.vars['feature_name'] as String; | ||
|
||
final isExists = Directory('packages/features/$featureName').existsSync(); | ||
|
||
if (isExists) { | ||
return; | ||
} | ||
|
||
// パッケージがまだ存在しない場合は、features_package_core brickでパッケージを作成する | ||
Process.runSync('mason', [ | ||
'make', | ||
'features_package_core', | ||
'--feature_name', | ||
featureName, | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: features_package_hooks | ||
|
||
environment: | ||
sdk: ^3.4.1 | ||
sdk: ">=2.12.0 <3.0.0" | ||
|
||
dependencies: | ||
mason: ">=0.1.0-dev.52 <0.1.0" | ||
mason: ">=0.1.0-dev.56 <0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 0.1.0+1 | ||
|
||
- TODO: Describe initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# features_package_core | ||
|
||
[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) | ||
|
||
featureパッケージを作成するbrickです。features_packageが内部で使うことを想定しています。 | ||
|
||
_Generated by [mason][1] 🧱_ | ||
|
||
## Getting Started 🚀 | ||
|
||
This is a starting point for a new brick. | ||
A few resources to get you started if this is your first brick template: | ||
|
||
- [Official Mason Documentation][2] | ||
- [Code generation with Mason Blog][3] | ||
- [Very Good Livestream: Felix Angelov Demos Mason][4] | ||
- [Flutter Package of the Week: Mason][5] | ||
- [Observable Flutter: Building a Mason brick][6] | ||
- [Meet Mason: Flutter Vikings 2022][7] | ||
|
||
[1]: https://github.com/felangel/mason | ||
[2]: https://docs.brickhub.dev | ||
[3]: https://verygood.ventures/blog/code-generation-with-mason | ||
[4]: https://youtu.be/G4PTjA6tpTU | ||
[5]: https://youtu.be/qjA0JFiPMnQ | ||
[6]: https://youtu.be/o8B1EfcUisw | ||
[7]: https://youtu.be/LXhgiF5HiQg |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: features_package_core | ||
description: featureパッケージの主要部分を作成するためのbrickです。直接使うのではなく、features_package brickから呼ぶことを想定しています。 | ||
|
||
version: 0.1.0 | ||
|
||
environment: | ||
mason: ">=0.1.0-dev.52 <0.1.0" | ||
|
||
vars: | ||
feature_name: | ||
type: string | ||
description: Feature name | ||
prompt: 'What is feature name? (example: foo_bar)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.dart_tool | ||
.packages | ||
pubspec.lock | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:mason/mason.dart'; | ||
|
||
void run(HookContext context) { | ||
Process.runSync( | ||
'melos', | ||
['bs'], | ||
); | ||
Process.runSync( | ||
'melos', | ||
['run', 'regenerate_by_using_gen_l10n'], | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: features_package_core_hooks | ||
|
||
environment: | ||
sdk: ^3.4.1 | ||
|
||
dependencies: | ||
mason: ">=0.1.0-dev.52 <0.1.0" |