Skip to content

Commit 53cf064

Browse files
erickzanardofelangel
authored andcommitted
feat: add publishable flag (#592)
1 parent da46724 commit 53cf064

File tree

9 files changed

+194
-87
lines changed

9 files changed

+194
-87
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# [0.9.0](https://github.com/VeryGoodOpenSource/very_good_cli/compare/v0.8.6...v0.9.0) (2022-12-06)
2+
3+
### Features
4+
5+
- add publishable flag ([#592](https://github.com/VeryGoodOpenSource/very_good_cli/issues/592)) ([89e6930](https://github.com/VeryGoodOpenSource/very_good_cli/commit/89e6930073934769d9f3733a9dadbe41942020c8))
6+
17
# [0.8.6](https://github.com/VeryGoodOpenSource/very_good_cli/compare/v0.8.5...v0.8.6) (2022-12-02)
28

39
### Features

lib/src/commands/create/create.dart

+8
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ class CreateCommand extends Command<int> {
121121
'application-id',
122122
help: 'The bundle identifier on iOS or application id on Android. '
123123
'(defaults to <org-name>.<project-name>)',
124+
)
125+
..addFlag(
126+
'publishable',
127+
negatable: false,
128+
help: 'Whether the generated project is intended to be published '
129+
'(Does not affect flutter application templates)',
124130
);
125131
}
126132

@@ -166,6 +172,7 @@ class CreateCommand extends Command<int> {
166172
final executableName =
167173
_argResults['executable-name'] as String? ?? projectName;
168174
final applicationId = _argResults['application-id'] as String?;
175+
final publishable = _argResults['publishable'] as bool?;
169176
var vars = <String, dynamic>{
170177
'project_name': projectName,
171178
'description': description,
@@ -180,6 +187,7 @@ class CreateCommand extends Command<int> {
180187
if (macos.toBool()) 'macos',
181188
if (windows.toBool()) 'windows',
182189
],
190+
if (publishable != null) 'publishable': publishable,
183191
};
184192
await generator.hooks.preGen(vars: vars, onVarsChanged: (v) => vars = v);
185193
final target = DirectoryGeneratorTarget(outputDirectory);

lib/src/commands/create/templates/very_good_dart_cli/very_good_dart_cli_bundle.dart

+17-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/commands/create/templates/very_good_dart_package/very_good_dart_package_bundle.dart

+17-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)