webdev 2.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 49

Build Status

A CLI for Dart web development.

See the Dart 2 Web Migration Guide for more information.

Installation #

$ pub global activate webdev

Usage #

webdev provides two commands: serve and build.

webdev serve #

$ webdev help serve
Run a local web development server and a file system watcher that rebuilds on
changes.

Usage: webdev serve [arguments] [<directory>[:<port>]]...
-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.
    --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]
    --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.

    --[no-]debug                  Enable the launching of DevTools (Alt + D).
                                  Must use with either --launch-in-chrome or
                                  --chrome-debug-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.

Run "webdev help" to see global options.

webdev build #

$ webdev help 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.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.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
0.2.3+2 Aug 1, 2018 Go to the documentation of webdev 0.2.3+2 Download webdev 0.2.3+2 archive
0.2.3+1 Jul 23, 2018 Go to the documentation of webdev 0.2.3+1 Download webdev 0.2.3+1 archive
0.2.3 Jun 25, 2018 Go to the documentation of webdev 0.2.3 Download webdev 0.2.3 archive
0.2.2 Jun 1, 2018 Go to the documentation of webdev 0.2.2 Download webdev 0.2.2 archive
0.2.1 May 7, 2018 Go to the documentation of webdev 0.2.1 Download webdev 0.2.1 archive

All 22 versions...

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

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.2.0.
 
 Because webdev requires SDK version >=2.2.1-dev.2.0 <3.0.0, version solving failed.

Health suggestions

Format lib/src/serve/handlers/dev_handler.dart.

Run dartfmt to format lib/src/serve/handlers/dev_handler.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.1-dev.2.0 <3.0.0