Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include: package:lintervention/analysis_options.yaml
{{#publishable}}include: package:lintervention/package.yaml{{/publishable}}
{{^publishable}}include: package:lintervention/app.yaml{{/publishable}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// {{{description}}}
library {{project_name.snakeCase()}};
library;

export 'src/{{project_name.snakeCase()}}.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: {{project_name.snakeCase()}}
description: {{{description}}}
version: 0.1.0
{{^publishable}}publish_to: none{{/publishable}}
{{#workspace}}resolution: workspace{{/workspace}}

environment:
sdk: ">=3.0.0 <4.0.0"
sdk: ">=3.9.0 <4.0.0"

dev_dependencies:
lintervention: ^0.3.1
lintervention: ^0.4.0
mocktail: ^1.0.4
test: ^1.26.2
test: ^1.26.3
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// We ignore prefer_const_constructors here to make testing more convenient.
// ignore_for_file: prefer_const_constructors
import 'package:test/test.dart';
import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart';
Expand Down
5 changes: 5 additions & 0 deletions wnma_dart_package/brick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ vars:
description: Whether the generated package is intended to be published.
default: false
prompt: Will the package be published?
workspace:
type: boolean
description: Whether this package is part of a dart workspace (such as melos >7.0.0)
default: true
prompt: Is this package part of a workspace?
3 changes: 2 additions & 1 deletion wnma_dart_package/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"project_name": "test_package",
"description": "Package for testing",
"publishable": true
"publishable": true,
"workspace": false
}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include: package:lintervention/analysis_options.yaml
{{#publishable}}include: package:lintervention/package.yaml{{/publishable}}
{{^publishable}}include: package:lintervention/app.yaml{{/publishable}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// {{{description}}}
library {{project_name.snakeCase()}};
library;

export 'src/{{project_name.snakeCase()}}.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: {{project_name.snakeCase()}}
description: {{{description}}}
version: 0.1.0
{{^publishable}}publish_to: none{{/publishable}}
{{#workspace}}resolution: workspace{{/workspace}}

environment:
sdk: ">=3.8.0 <4.0.0"
flutter: ">=3.32.0"
sdk: ">=3.9.0 <4.0.0"
flutter: ">=3.35.0"

dependencies:
flutter:
Expand All @@ -14,5 +15,5 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lintervention: ^0.3.1
lintervention: ^0.4.0
mocktail: ^1.0.4
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// We ignore prefer_const_constructors here to make testing more convenient.
// ignore_for_file: prefer_const_constructors
import 'package:flutter_test/flutter_test.dart';
import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart';
Expand Down
6 changes: 5 additions & 1 deletion wnma_flutter_package/brick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ vars:
description: Whether the generated package is intended to be published.
default: false
prompt: Will the package be published?

workspace:
type: boolean
description: Whether this package is part of a dart workspace (such as melos >7.0.0)
default: true
prompt: Is this package part of a workspace?
3 changes: 2 additions & 1 deletion wnma_flutter_package/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"project_name": "test_package",
"description": "Package for testing",
"publishable": true
"publishable": true,
"workspace": false
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:lintervention/analysis_options.yaml
include: package:lintervention/app.yaml
66 changes: 0 additions & 66 deletions wnma_workspace/__brick__/{{project_name.snakeCase()}}/melos.yaml

This file was deleted.

75 changes: 71 additions & 4 deletions wnma_workspace/__brick__/{{project_name.snakeCase()}}/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,77 @@ description: {{{description}}}
version: 0.1.0
publish_to: none

# TODO Add your workspace packages or apps here
# workspace:
# - packages/my_package

environment:
sdk: ">=3.8.0 <4.0.0"
flutter: ">=3.32.0"
sdk: ">=3.9.0 <4.0.0"
flutter: ">=3.35.0"

dev_dependencies:
lintervention: ^0.3.1
melos: ^6.3.3
lintervention: ^0.4.0
melos: ^7.1.1

melos:
command:
version:
updateGitTagRefs: true
workspaceChangelog: false
hooks:
preCommit: |
melos run generate
git add .

scripts:
analyze:
run: |
dart analyze . --fatal-infos
exec:
# We are setting the concurrency to 1 because a higher concurrency can crash
# the analysis server on low performance machines (like GitHub Actions).
concurrency: 1
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.

test:select:
run: flutter test
exec:
failFast: true
concurrency: 6
packageFilters:
dirExists: test
description: Run `flutter test test` for selected packages.

test:
run: melos run test:select --no-select
description: Run all tests in this project.

coverage:select:
run: |
flutter test --coverage
exec:
failFast: true
concurrency: 6
packageFilters:
dirExists: test
description: Generate coverage for the selected package.

coverage:
run: melos run coverage:select --no-select
description: Generate coverage for all packages.

generate:select:
description: Run code generation for selected packages.
run: dart run build_runner build --delete-conflicting-outputs
exec:
concurrency: 1
failFast: true
packageFilters:
dependsOn:
- build_runner

generate:
description: Run code generation for all packages.
run: melos run generate:select --no-select