Skip to content

Commit f5f6b34

Browse files
committed
Update
1 parent d6d9681 commit f5f6b34

File tree

13 files changed

+67
-22
lines changed

13 files changed

+67
-22
lines changed

melos.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ scripts:
77
# ANALYZING
88

99
lint:
10-
run: melos run lint:dart && melos run lint:dcm
10+
run: melos run -- lint:dart && melos run lint:dcm
1111
description: Run all static analysis checks.
1212

1313
lint:dart:
@@ -26,6 +26,12 @@ scripts:
2626
dirExists:
2727
- test
2828

29+
publishable:
30+
run: melos exec -- dart pub publish --dry-run
31+
description: Checks whether packages are publishable.
32+
packageFilters:
33+
scope: "*"
34+
2935
# CLEAN
3036

3137
clean:
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
include: package:netglade_analysis/lints.yaml
1+
include: ../lib/lints.yaml
2+
3+
dart_code_metrics:
4+
extends:
5+
- ../lib/dcm.yaml
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
void main() {
22
/// The following line would normally show lint warnings
33
/// but we can disable the lint rules for this line using the following syntax:
4-
// ignore: unused_local_variable, prefer_final_locals
4+
// ignore: unused_local_variable, prefer_final_locals, for demo
55
var a = 5;
66
}

packages/netglade_analysis/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: netglade_analysis
22
version: 7.0.0
33
description: Lint rules for Dart and Flutter used internally at netglade.
4-
repository: https://github.com/netglade/netglade_analysis
5-
issue_tracker: https://github.com/netglade/netglade_analysis/issues
6-
homepage: https://github.com/netglade/netglade_analysis
7-
documentation: https://github.com/netglade/netglade_analysis
4+
repository: https://github.com/netglade/flutter_core/tree/main/packages/netglade_analysis
5+
issue_tracker: https://github.com/netglade/flutter_core/issues
6+
homepage: https://github.com/netglade/flutter_core
7+
documentation: https://github.com/netglade/flutter_core/tree/main/packages/netglade_analysis
88
screenshots:
99
- description: The netglade_analysis package logo.
1010
path: doc/icon.png
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
include: package:netglade_analysis/lints.yaml
2+
3+
dart_code_metrics:
4+
extends:
5+
- package:netglade_analysis/dcm.yaml
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:netglade_flutter_utils/netglade_flutter_utils.dart';
3+
14
void main() {
2-
/// The following line would normally show lint warnings
3-
/// but we can disable the lint rules for this line using the following syntax:
4-
// ignore: unused_local_variable, prefer_final_locals
5-
var a = 5;
5+
runApp(const DemoApp());
6+
}
7+
8+
// ignore: prefer-match-file-name, ok for demo
9+
class DemoApp extends StatelessWidget {
10+
const DemoApp({super.key});
11+
12+
@override
13+
Widget build(BuildContext context) {
14+
return Scaffold(
15+
body: Conditional(
16+
condition: true,
17+
whenTrue: (context) => const Text('yep'),
18+
whenFalse: (context) => const Text('nope'),
19+
),
20+
);
21+
}
622
}

packages/netglade_flutter_utils/example/pubspec.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ publish_to: none
44

55
environment:
66
sdk: ^3.0.0
7+
flutter: ">=3.0.0"
78

89
dependencies:
10+
flutter:
11+
sdk: flutter
912
netglade_analysis: ^7.0.0
13+
netglade_flutter_utils:
14+
path: ..
15+
16+
flutter:
17+
uses-material-design: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/// NetGlade Flutter utils library
22
/// used internally at [netglade](https://netglade.com).
33
library netglade_flutter_utils;
4+
5+
export 'src/conditionals/conditionals.dart';
6+
export 'src/extensions/extensions.dart';
7+
export 'src/hooks/hooks.dart';

packages/netglade_flutter_utils/pubspec.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: netglade_flutter_utils
22
version: 1.0.0
33
description: Flutter utils used internally at netglade.
4-
repository: https://github.com/netglade/flutter_core/packages/netglade_flutter_utils
4+
repository: https://github.com/netglade/flutter_core/tree/main/packages/netglade_flutter_utils
55
issue_tracker: https://github.com/netglade/flutter_core/issues
66
homepage: https://github.com/netglade/flutter_core
7-
documentation: https://github.com/netglade/flutter_core
8-
screenshots:
9-
- description: The netglade_flutter_utils package logo.
10-
path: doc/icon.png
7+
documentation: https://github.com/netglade/flutter_core/tree/main/packages/netglade_flutter_utils
118

129
environment:
1310
sdk: ^3.0.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
include: package:netglade_analysis/lints.yaml
2+
3+
dart_code_metrics:
4+
extends:
5+
- package:netglade_analysis/dcm.yaml

0 commit comments

Comments
 (0)