Skip to content

Commit

Permalink
chore: move all files to src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
oppahansi committed Dec 22, 2023
1 parent df6f6b7 commit 6972183
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 30 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.3

- Moved all files in src folder to hide them from importing.

## 1.0.2

- Dropped all barrel files to not export anything.
Expand Down
8 changes: 4 additions & 4 deletions bin/better_imports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import "package:intl/intl.dart";
import "package:logging/logging.dart";

// Project Imports
import "package:better_imports/arg_parser.dart";
import "package:better_imports/constants.dart";
import "package:better_imports/log.dart";
import "package:better_imports/sort_cmd.dart";
import "package:better_imports/src/arg_parser.dart";
import "package:better_imports/src/constants.dart";
import "package:better_imports/src/log.dart";
import "package:better_imports/src/sort_cmd.dart";

void main(List<String> args) {
_setupLogging();
Expand Down
2 changes: 1 addition & 1 deletion lib/arg_parser.dart → lib/src/arg_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'package:args/args.dart';

// Project Imports
import 'package:better_imports/constants.dart';
import 'package:better_imports/src/constants.dart';

final argParser = ArgParser()
..addFlag(
Expand Down
6 changes: 3 additions & 3 deletions lib/cfg.dart → lib/src/cfg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:args/args.dart';
import 'package:yaml/yaml.dart';

// Project Imports
import 'package:better_imports/constants.dart';
import 'package:better_imports/file_extension.dart';
import 'package:better_imports/log.dart';
import 'package:better_imports/src/constants.dart';
import 'package:better_imports/src/file_extension.dart';
import 'package:better_imports/src/log.dart';

var logging = false;

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/file_collector.dart → lib/src/file_collector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import 'dart:io';

// Project Imports
import 'package:better_imports/cfg.dart';
import 'package:better_imports/log.dart';
import 'package:better_imports/src/cfg.dart';
import 'package:better_imports/src/log.dart';

class Collector {
final Cfg cfg;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions lib/import_sorter.dart → lib/src/import_sorter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import 'package:analyzer/dart/ast/token.dart';
import 'package:dart_style/dart_style.dart';

// Project Imports
import 'package:better_imports/cfg.dart';
import 'package:better_imports/constants.dart';
import 'package:better_imports/file_collector.dart';
import 'package:better_imports/log.dart';
import 'package:better_imports/src/cfg.dart';
import 'package:better_imports/src/constants.dart';
import 'package:better_imports/src/file_collector.dart';
import 'package:better_imports/src/log.dart';

enum ImportType {
dart,
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions lib/sort_cmd.dart → lib/src/sort_cmd.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:args/args.dart';
import 'package:tint/tint.dart';

// Project Imports
import 'package:better_imports/cfg.dart';
import 'package:better_imports/file_collector.dart';
import 'package:better_imports/file_extension.dart';
import 'package:better_imports/import_sorter.dart';
import 'package:better_imports/log.dart';
import 'package:better_imports/src/cfg.dart';
import 'package:better_imports/src/file_collector.dart';
import 'package:better_imports/src/file_extension.dart';
import 'package:better_imports/src/import_sorter.dart';
import 'package:better_imports/src/log.dart';

class SortCmd {
final ArgResults argResults;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: better_imports
description: A better imports sorter for your .dart files.
version: 1.0.2
version: 1.0.3
repository: https://github.com/oppahansi/better_imports

executables:
Expand Down
6 changes: 3 additions & 3 deletions test/cfg_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'dart:io';
import 'package:test/test.dart';

// Project Imports
import 'package:better_imports/arg_parser.dart';
import 'package:better_imports/cfg.dart';
import 'package:better_imports/file_extension.dart';
import 'package:better_imports/src/arg_parser.dart';
import 'package:better_imports/src/cfg.dart';
import 'package:better_imports/src/file_extension.dart';

void main() {
group("Cfg Tests.", () {
Expand Down
6 changes: 3 additions & 3 deletions test/file_collector_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import 'package:test/test.dart';

// Project Imports
import 'package:better_imports/arg_parser.dart';
import 'package:better_imports/cfg.dart';
import 'package:better_imports/file_collector.dart';
import 'package:better_imports/src/arg_parser.dart';
import 'package:better_imports/src/cfg.dart';
import 'package:better_imports/src/file_collector.dart';

void main() {
group("Collector Tests. Test amount of collected files.", () {
Expand Down
8 changes: 4 additions & 4 deletions test/sorter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:dart_style/dart_style.dart';
import 'package:test/test.dart';

// Project Imports
import 'package:better_imports/arg_parser.dart';
import 'package:better_imports/cfg.dart';
import 'package:better_imports/file_collector.dart';
import 'package:better_imports/import_sorter.dart';
import 'package:better_imports/src/arg_parser.dart';
import 'package:better_imports/src/cfg.dart';
import 'package:better_imports/src/file_collector.dart';
import 'package:better_imports/src/import_sorter.dart';

// Relative Project Imports
import '../res/sorter_fixtures.dart';
Expand Down

0 comments on commit 6972183

Please sign in to comment.