webdev 2.0.5

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 85

Pub Package Build Status

A command-line tool for developing and deploying web applications with Dart.

Requirements #

The latest release of webdev requires Dart SDK 2.3 or later. This corresponds to Flutter SDK 1.5 or later.

To use webdev with a package, make sure you have entries in pubspec.yaml similar to:

...
dev_dependencies:
  build_runner: ^1.3.0
  build_web_compilers: ^2.0.0
...

build_web_compliers ^1.2.0 is supported, but with some limited functionality.

Installation #

webdev is not meant to be used as a dependency. Instead, it should be "activated".

$ pub global activate webdev
# or
$ flutter packages pub global activate webdev

Learn more about activating and using packages here.

Usage #

webdev provides two commands: serve and build.

webdev serve #

Run a local web development server and a file system watcher that rebuilds on
changes.

Usage: webdev serve [arguments] [<directory>[:<port>]]...
    --auto                        Automatically performs an action after each
                                  build:

                                  restart: Reload modules and re-invoke main
                                  (loses current state)
                                  refresh: Performs a full page refresh.
                                  [restart, refresh]

    --[no-]debug                  Enable the launching of DevTools (Alt + D /
                                  Option + D). This also enables
                                  --launch-in-chrome.

Advanced:
    --chrome-debug-port           Specify which port the Chrome debugger is
                                  listening on. If used with launch-in-chrome
                                  Chrome will be started with the debugger
                                  listening on this port.

    --hostname                    Specify the hostname to serve on.
                                  (defaults to "localhost")

    --[no-]launch-in-chrome       Automatically launches your application in
                                  Chrome with the debug port open. Use
                                  chrome-debug-port to specify a specific port
                                  to attach to an already running chrome
                                  instance instead.

    --log-requests                Enables logging for each request to the
                                  server.

Common:
-h, --help                        Print this usage information.
-o, --output                      A directory to write the result of a build to.
                                  Or a mapping from a top-level directory in the
                                  package to the directory to write a filtered
                                  build output to. For example "web:deploy".
                                  A value of "NONE" indicates that no "--output"
                                  value should be passed to `build_runner`.
                                  (defaults to "NONE")

-r, --[no-]release                Build with release mode defaults for builders.
    --[no-]build-web-compilers    If a dependency on `build_web_compilers` is
                                  required to run.
                                  (defaults to on)

-v, --verbose                     Enables verbose logging.

Run "webdev help" to see global options.

webdev build #

Run builders to build a package.

Usage: webdev build [arguments]
-h, --help                        Print this usage information.
-o, --output                      A directory to write the result of a build to.
                                  Or a mapping from a top-level directory in the
                                  package to the directory to write a filtered
                                  build output to. For example "web:deploy".
                                  A value of "NONE" indicates that no "--output"
                                  value should be passed to `build_runner`.
                                  (defaults to "web:build")

-r, --[no-]release                Build with release mode defaults for builders.
                                  (defaults to on)

    --[no-]build-web-compilers    If a dependency on `build_web_compilers` is
                                  required to run.
                                  (defaults to on)

-v, --verbose                     Enables verbose logging.

Run "webdev help" to see global options.

2.0.5 #

  • Use HttpMultiServer to fix bind issues with IPv6 / IPv4.

2.0.4 #

  • Fix loading apps in non-chrome browsers in --debug mode
    • Add a nice error if attempting to launch devtools in non-chrome browsers.
  • Detect flutter and flutter_test dependencies and fail with a nice message.

2.0.3 #

  • Support latest package:build_daemon.
  • Fix Chrome issues while running through VS Code.

2.0.2 #

  • Support package:dwds version 0.3.0.

2.0.1 #

  • Fix launching Chrome on Windows.

2.0.0 #

Breaking Changes #

  • The serve command will now only serve web by default.
  • Deprecated the --hot-reload and --live-reload flags, in favor of the new --auto=<action> option which performs an action whenever a build completes.
    • The current supported actions are restart and refresh, which correspond to the old --hot-reload and --live-reload flags.
  • Support building with package:build_daemon. This allows shared builds as long as the build arguments are compatible.
    • This should not affect most users but might break some workflows.
    • Prompts are not supported, so you may have to pass the -- --delete-conflicting-outputs argument if you used to hit y at the prompt.

Features #

  • Added the --debug flag.
    • Runs a proxy dart vm service with limited functionality, which talks to the running in chrome.
    • Enables devtools for web apps.
      • For regular web apps currently this doesn't actually do anything yet, except for supported frameworks which will enable some tabs.
      • Use alt+d (or option+d on Mac) in the web app to launch devtools.
  • Allow build_web_compilers 2.x.

1.0.1 #

  • Support package:build_web_compilers v1.0.0.

1.0.0 #

  • Support package:build_runner v1.0.0.
  • Add --version to CLI.

0.2.5 #

  • Added support for the --hot-reload flag, if on build_runner >=0.10.2.

0.2.4+1 #

  • Print Creating build script on startup so the user is aware of what the process is doing.

0.2.4 #

  • Added support for the --live-reload flag, if on build_runner >=0.10.1.

0.2.3+2 #

  • Support latest package:build_runner.

0.2.3+1 #

  • Support Dart 2 stable.

0.2.3 #

  • Update required Dart SDK and package:build_runner to support latest versions.

0.2.2 #

  • Add default value for --output to be build:web for the build command and NONE for the serve command.
  • Update to use lower-case constants from Dart ^2.0.0-dev.54.

0.2.1 #

  • Support package:build_web_compilers v0.4.0.
  • Always pass the argument --fail-on-severe to the build command.
  • Exit with an error if unsupported arguments are passed to build command.

0.2.0 #

  • Pass the arguments supporting directory:port for the serve command.
  • Add the requirement for build_web_compilers to build command.
  • Renamed --require-build-web-compilers flag to --build-web-compilers.

0.1.4 #

  • Require and use features from build_runner 0.8.2.
    • Added a --[no]-release flag.
  • Require build_web_compliers 0.3.6 when running serve.
    • Unless the --no-require-build-web-compilers flag is provided.

0.1.3+1 #

  • Support running pub when it's not in the environment path.

0.1.3 #

  • Now runs on Windows.

0.1.2 #

  • Remove check for build_web_compilers. Allows general support for build_runner from tools.
  • Use pub deps to validate target directory.

0.1.1 #

  • Checks for a dependency on build_web_compilers.
  • Gracefully handle exceptions.

0.1.0 #

  • Initial release. Supports basic invocation of build and serve with build_runner: ^0.8.0.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate webdev

2. Use it

The package has the following executables:


$ webdev
Version Uploaded Documentation Archive
2.0.5 May 11, 2019 Go to the documentation of webdev 2.0.5 Download webdev 2.0.5 archive
2.0.4 May 1, 2019 Go to the documentation of webdev 2.0.4 Download webdev 2.0.4 archive
2.0.3 Apr 26, 2019 Go to the documentation of webdev 2.0.3 Download webdev 2.0.3 archive
2.0.2 Apr 25, 2019 Go to the documentation of webdev 2.0.2 Download webdev 2.0.2 archive
2.0.1 Apr 24, 2019 Go to the documentation of webdev 2.0.1 Download webdev 2.0.1 archive
2.0.0 Apr 22, 2019 Go to the documentation of webdev 2.0.0 Download webdev 2.0.0 archive
1.0.1 Dec 10, 2018 Go to the documentation of webdev 1.0.1 Download webdev 1.0.1 archive
1.0.0 Sep 27, 2018 Go to the documentation of webdev 1.0.0 Download webdev 1.0.0 archive
0.2.4+1 Aug 28, 2018 Go to the documentation of webdev 0.2.4+1 Download webdev 0.2.4+1 archive
0.2.4 Aug 8, 2018 Go to the documentation of webdev 0.2.4 Download webdev 0.2.4 archive

All 27 versions...

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

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

  • Dart: 2.3.1
  • pana: 0.12.16

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health suggestions

Fix lib/src/daemon/utilites.dart. (-1 points)

Analysis of lib/src/daemon/utilites.dart reported 2 hints:

line 18 col 5: DO use curly braces for all flow control structures.

line 38 col 5: DO use curly braces for all flow control structures.

Fix lib/src/daemon/daemon.dart. (-0.50 points)

Analysis of lib/src/daemon/daemon.dart reported 1 hint:

line 82 col 43: DO use curly braces for all flow control structures.

Fix lib/src/daemon_client.dart. (-0.50 points)

Analysis of lib/src/daemon_client.dart reported 1 hint:

line 32 col 5: DO use curly braces for all flow control structures.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.1-dev.2.0 <3.0.0
args ^1.5.0 1.5.1
async ^2.2.0 2.2.0
build_daemon >=0.5.0 <0.7.0 0.6.1 1.0.0
built_value ^6.3.0 6.5.0
crypto ^2.0.6 2.0.6
devtools ^0.0.15-dev.1 0.0.19 0.1.0
dwds ^0.3.0 0.3.2
http ^0.12.0 0.12.0+2
http_multi_server ^2.0.0 2.0.6
io ^0.3.2+1 0.3.3
logging ^0.11.0 0.11.3+2
meta ^1.1.2 1.1.7
path ^1.5.1 1.6.2
pedantic ^1.5.0 1.7.0
pub_semver ^1.3.2 1.4.2
pubspec_parse ^0.1.4 0.1.4
shelf ^0.7.4 0.7.5
shelf_proxy ^0.1.0+5 0.1.0+6
shelf_static ^0.2.8 0.2.8
sse ^2.0.0 2.0.2
stack_trace ^1.9.2 1.9.3
vm_service_lib ^3.14.2 3.15.1+1 3.15.1+2
webkit_inspection_protocol ^0.4.0 0.4.0
yaml ^2.1.13 2.1.15
Transitive dependencies
browser_launcher 0.1.2
built_collection 4.2.2
charcode 1.1.2
codemirror 0.5.5+5.46.0
collection 1.14.11
convert 2.1.1
devtools_server 0.1.2
fixnum 0.10.9
http_parser 3.1.3
intl 0.15.8
json_annotation 2.4.0
matcher 0.12.5
mime 0.9.6+2
octicons_css 0.0.1
package_config 1.0.5
package_resolver 1.0.10
platform_detect 1.3.5
plotly_js 0.0.1
polymer_css 0.0.1
pool 1.4.0
primer_css 0.0.2
quiver 2.0.3
rxdart 0.21.0 0.22.0
shelf_web_socket 0.2.3
source_maps 0.10.8
source_span 1.5.5
split 0.0.2
stream_channel 2.0.0
stream_transform 0.0.19
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+10
web_socket_channel 1.0.13
Dev dependencies
build ^1.0.0
build_runner ^1.0.0
build_verify ^1.0.0
build_version ^2.0.0
build_web_compilers >=1.0.0 <3.0.0
built_value_generator ^6.4.0
graphs ^0.2.0
js ^0.6.1 0.6.1+1
test ^1.6.0
test_descriptor ^1.0.3
test_process ^1.0.1
uuid ^2.0.0 2.0.1
webdriver ^2.0.0