A command line tool that provides Dart 1 and Dart 2 compatible build and serve commands to ease the transition to Dart 2.
This tool is intended to be used as a transition tool when moving from Dart 1
to Dart 2. Since the
pub serve and
pub build commands are not present in
Dart 2, you can use dart_build to run the same command under both versions of
Dart, thus easing the transition to Dart 2. With dart_build you don't need to
modify your pubspec.yaml to add build_runner and build_web_compilers to be
able to build under Dart 2. Those dependencies are included by adding a
dependency on dart_build.
Add dart_build as a dev_dependency to your pubspec.yaml. When pub get solves you'll either the #.#.#+dart1 or the #.#.#+dart2 version depending on if you run the pub get command under Dart 1 or Dart 2.
dev_dependencies: dart_build: ^0.1.0
To run a build or serve simply swap out
pub run dart_build
in your usual commands. All of the command line options and arguments
are passed along, so all supported options of pub serve or build_runner
should be supported. For local use, adding an alias is recommended so you
don't need to type such a long command.
alias db='pub run dart_build'
pub run dart_build serve pub run dart_build build
or with the alias set up:
db serve db build
You can install the package from the command line:
$ pub global activate dart_build
The package has the following executables:
|0.1.0+dart2||May 17, 2018|
|0.1.0+dart1||May 17, 2018|
We analyzed this package on May 22, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: Flutter, web, other
No platform restriction found in libraries.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
Create a short demo in the
example/directory to show how to use this package. Common file name patterns include:
example.dartor you could also use
|Dart SDK||>=2.0.0-dev.51.0 <2.0.0|