dart_build 0.1.1

dart_build #

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.

Installation #

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

Usage #

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'

Example: #

pub run dart_build serve
pub run dart_build build

or with the alias set up:

db serve
db build

0.1.0 #

  • 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
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
56
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
33
Learn more about scoring.

We analyzed this package on Jul 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health issues and suggestions

Fix bin/dart_build.dart. (-43.75 points)

Analysis of bin/dart_build.dart failed with 2 errors:

line 125 col 18: Undefined name 'UTF8'.

line 131 col 18: Undefined name 'UTF8'.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (build_runner, build_web_compilers).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.2 <3.0.0
build_runner >=0.6.0 <1.0.0 0.10.3 1.6.1
build_web_compilers >=0.2.0 <1.0.0 0.4.4+3 2.1.4
io ^0.3.2+1 0.3.3
path ^1.5.1 1.6.2
stack_trace ^1.9.2 1.9.3
Transitive dependencies
analyzer 0.32.6 0.37.0
archive 2.0.10
args 1.5.2
async 2.3.0
bazel_worker 0.1.21
build 0.12.8 1.1.5
build_config 0.3.2 0.4.1
build_modules 1.0.3 2.3.1
build_resolvers 0.2.2+7 1.0.6
build_runner_core 1.0.0 3.0.6
built_collection 4.2.2
built_value 6.7.0
charcode 1.1.2
code_builder 3.2.0
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.16.1
dart_style 1.1.3 1.2.9
fixnum 0.10.9
front_end 0.1.4+2 0.1.20
glob 1.1.7
graphs 0.1.3+1 0.2.0
html 0.14.0+2
http_multi_server 2.1.0
http_parser 3.1.3
js 0.6.1+1
json_annotation 1.2.0 2.4.0
kernel 0.3.4+2 0.3.20
logging 0.11.3+2
matcher 0.12.5
meta 1.1.7
mime 0.9.6+3
package_config 1.0.5
pedantic 1.8.0+1
plugin 0.2.0+3
pool 1.4.0
protobuf 0.13.15
pub_semver 1.4.2
pubspec_parse 0.1.4
quiver 2.0.3
scratch_space 0.0.3+2
shelf 0.7.5
shelf_web_socket 0.2.3
source_maps 0.10.8
source_span 1.5.5
stream_channel 2.0.0
stream_transform 0.0.19
string_scanner 1.0.4
term_glyph 1.1.0
timing 0.1.1+1
typed_data 1.1.6
watcher 0.9.7+12
web_socket_channel 1.0.14
yaml 2.1.16

Admin