-
Notifications
You must be signed in to change notification settings - Fork 26
Feature/group-packages #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #61 +/- ##
==========================================
+ Coverage 70.97% 72.00% +1.02%
==========================================
Files 15 15
Lines 572 593 +21
==========================================
+ Hits 406 427 +21
Misses 166 166
Continue to review full report at Codecov.
|
There's still 1 todo i need to finish, but the main part is ready. I will appreciate if u check tihs, @BirjuVachhani |
And i will also add tests for |
String get ignoreRulesTemplate => '// ignore_for_file: [IGNORED_RULES]\n\n'; | ||
|
||
/// A template to generate export statements in dart source code. | ||
String get exportFileTemplate => "export '[FILE_NAME]';"; | ||
String get exportFileTemplate => | ||
"export 'package:[PROJECT_NAME]/[PACKAGE]/[FILE_NAME]';"; | ||
|
||
/// A template to generate `part` directive statement in the dart | ||
/// library source file. | ||
String get partTemplate => "part '[FILE_NAME]';"; | ||
String get partTemplate => | ||
"part 'package:[PROJECT_NAME]/[PACKAGE]/[FILE_NAME]';"; | ||
|
||
/// A template to generate `part of` directive statements in the dart | ||
/// asset reference files. | ||
String get partOfTemplate => "part of '[FILE_NAME]';"; | ||
String get partOfTemplate => | ||
"part of 'package:[PROJECT_NAME]/[PACKAGE]/[FILE_NAME]';"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an oversight or am I not getting this? I have never seen part
directive with package:
in the path.
for (final group in groups) { | ||
group.forEach((key, value) { | ||
if (value == null) { | ||
if (value == null && key != 'package') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we checking for key != 'package'
? package
key shouldn't be present with explicit null value. That's what this should be checking!
@Sanlovty Hey, Would you please take a look at those comments I left? Thanks. |
Description of the Change
Groups now have
package
property.Global scope
package
property is always root for the grouppackage
s.1) if we have case:
then we will have
2) If we have case:
then we will have
3) If we have case:
then we will have ( if package in globlal scope is empty, than group packages are the subfolders of
Constants.DEFAULT_PACKAGE
)Alternate Designs
It's possible to do fully custom directories for both classes and resource files but i don't think it's needed
Benefits
Now user is able to make some type of structure (passing different groups into different folders)
Possible Drawbacks
Can't find
Verification Process
dart test, hand tests
Applicable Issues
Closes #57