DartPackage class

Utilities about a Dart package.

Constructors

DartPackage(Directory root)
Construct an instance with the specified root directory object.
const
DartPackage.resolve(String path)
Construct an instance with the specified path.

Properties

changelog → File
The CHANGELOG.md file directly in the package root.
no setter
gitignores → Iterable<File>
All .gitignore files inside the package.
no setter
hashCode → int
The hash code for this object.
no setterinherited
libDirectory → Directory
Lib directory of the Dart package, the entry of all libraries.
no setter
manifest → YamlMap
The parsed manifest content in YamlMap format.
no setter
manifestFile → File
The pubspec.yaml manifest file of current package.
no setter
pubignore → File
The .pubignore file of the package.
no setter
root → Directory
Root directory of the Dart package.
final
rootGitignore → File
The .gitignore file at root, but possibly not exist.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
testDirectory → Directory
Test directory of the Dart package, the entry of all tests.
no setter

Methods

directory(List<String> paths) → Directory
Get a directory according to the relative path to package root.
file(List<String> paths) → File
Get a file according to the relative path to package root.
generateChangelog({String outputFilename = '.changelog.md'}) → void
Generate changelog of current version.
generatePubignore({bool basedOnRootGitignore = true, Iterable<File> basedOn = const [], List<String> additionalIgnores = const []}) → void
Generate a .pubignore file at the package root.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(String executable, List<String> arguments, {Map<String, String>? environment, bool includeParentEnvironment = true, bool runInShell = true, ProcessStartMode mode = ProcessStartMode.inheritStdio}) → Future<int>
Run a command in the root directory.
test({Map<String, String>? environment, bool includeParentEnvironment = true, bool runInShell = true, ProcessStartMode mode = ProcessStartMode.inheritStdio}) → Future<void>
Test all files inside this Dart package.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited