dart_build 0.1.0+dart2

  • README.md
  • Installing
  • Versions
  • new50


NOTE: This project is < 1.0.0 and is not considered stable yet

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.

  dart_build: ^0.1.0


To run a build or serve simply swap out pub with 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


  • Copy relevant build_runner pieces from webdev
  • Add in dart 1 ability to run pub build & serve
  • Update licensing to include Workiva + original Dart team license

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate dart_build

2. Use it

The package has the following executables:

$ dart_build
Version Uploaded Documentation Archive
0.1.0+dart2 May 17, 2018 Go to the documentation of dart_build 0.1.0+dart2 Download dart_build 0.1.0+dart2 archive
0.1.0+dart1 May 17, 2018 Go to the documentation of dart_build 0.1.0+dart1 Download dart_build 0.1.0+dart1 archive


We analyzed this package on May 22, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.54.0
  • pana: 0.11.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


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: main.dart, example.dart or you could also use dart_build.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.51.0 <2.0.0
build_runner ^0.8.0 0.8.9
build_web_compilers ^0.3.1 0.3.8 0.4.0+1
io ^0.3.2+1 0.3.2+1
path ^1.5.1 1.5.1
stack_trace ^1.9.2 1.9.2
Transitive dependencies
analyzer 0.31.1 0.32.0
archive 1.0.33
args 1.4.3
async 2.0.7
bazel_worker 0.1.10
build 0.12.6
build_config 0.2.6+2
build_modules 0.2.2+5
build_resolvers 0.2.0+2
built_collection 3.1.1
built_value 5.4.4
charcode 1.1.1
cli_util 0.1.3
code_builder 3.0.3
collection 1.14.9
convert 2.0.1
crypto 2.0.3
csslib 0.14.4
dart_style 1.0.9+1 1.0.14
fixnum 0.10.7
front_end 0.1.0-alpha.9 0.1.0
glob 1.1.5
graphs 0.1.2
html 0.13.3
http_multi_server 2.0.4
http_parser 3.1.2
isolate 1.1.0 2.0.0
js 0.6.1
json_annotation 0.2.4
kernel 0.3.0-alpha.9 0.3.0
logging 0.11.3+1
matcher 0.12.2+1
meta 1.1.5
mime 0.9.6+1
package_config 1.0.3
plugin 0.2.0+2
pool 1.3.5
protobuf 0.8.0
pub_semver 1.4.1
quiver 0.29.0+1
scratch_space 0.0.2+1
shelf 0.7.3
source_maps 0.10.5
source_span 1.4.0
stream_channel 1.6.6
stream_transform 0.0.11
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
yaml 2.1.13