drtimport 1.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • new48

drtimport #

A command line application that allow helps refactor dart libraries.

You can use it to move a library (or directory of libraries) and drtimport will update import statements across your whole package to reflect the new location of files.

Dart import management, version: 1.0.2

Usage: drtimport [arguments]

Global options: -h, --help Print this usage information.

Available commands: help Display help information for drtimport. move Moves a dart library and updates all import statements to reflect its new location. patch Patches import statements by doing a string replace.

Run "drtimport help " for more information about a command.

move:

move

--debug          Turns on debug ouput

-v, --version Outputs the version of drtimport and exits.

patch:

Patches import statements by doing a string replace within every import statement.

1.0.5 #

Fixed an logger override.

1.0.4 #

added example to make pub.dev happy.

1.0.3 #

Updated doco, remove lint warnings after upgrade.

1.0.2 #

Fixed a bug where local packages were not update as there were incorrectly tagged as external packages.

1.0.1 #

  • Initial release.

1.0.0 #

  • Initial version, created by Stagehand

example/example.dart

/// This package is a command line tool not a library
/// hence no example.
/// See the readme file for details on how to run this tool.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate drtimport

2. Use it

The package has the following executables:


$ drtimport

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  drtimport: ^1.0.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:drtimport/dart_import_app.dart';
import 'package:drtimport/library.dart';
import 'package:drtimport/line.dart';
import 'package:drtimport/move_command.dart';
import 'package:drtimport/move_result.dart';
import 'package:drtimport/patch_command.dart';
import 'package:drtimport/pubspec.dart';
import 'package:drtimport/stack_list.dart';
import 'package:drtimport/util/enum_helper.dart';
import 'package:drtimport/util/log.dart';
import 'package:drtimport/util/stack_list.dart';
import 'package:drtimport/util/stack_trace_impl.dart';
import 'package:drtimport/yaml.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Format lib/pubspec.dart.

Run dartfmt to format lib/pubspec.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (recase).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
args ^1.5.2 1.5.2
file_utils ^0.1.3 0.1.4
intl ^0.16.0 0.16.1
logger ^0.8.0 0.8.3
path ^1.6.4 1.6.4
pedantic ^1.8.0 1.9.0
recase ^2.0.1 2.0.1 3.0.0
yaml ^2.2.0 2.2.0
Transitive dependencies
charcode 1.1.2
collection 1.14.12
globbing 0.3.0
io 0.3.3
meta 1.1.8
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
test ^1.6.0