pubs 0.1.1+2

  • Installing
  • Versions
  • 0

Pubs - tools for managing Pub packages.

TODO ...


pub global activate pubs
pub global run pubs



deployable is currently the only implemented command.

pub global run pubs deployable or just pubs deployable if you have ~/.pub-cache/bin added to your path, copies files necessary to deploy your Dart server application into one directory (build/bin by default), similar to pub build bin.

The steps it processes:

  • purge the output directory
  • copy content of bin to build/bin/
  • copy the content of all dependencies to build/bin/packages
  • create a build/bin/.packages file which links to the copied packages.
  • copy build/web to build/bin/web (optional)
  • create a ZIP file build/ containing all files from build/bin

Available options:

-o, --output-directory
The absolute or relative path where the directory should be created. (defaults to "build/bin")
-b, --bin-directory
The absolute or relative path to the directory containing the server application entry points. (defaults to "bin")
-p, --package-discovery-start
The directory where the package discovery starts to find a .packages file or a packages directory. Default is the current working directory.
-s, --static-source
A directory containing static files to copy into the deployable directory. (defaults to "build/web")
-t, --static-destination
The destination directory inside the deployable directory, where to copy the static files to. (defaults to "build/bin/web")
-k, --[no-]skip-unused
Use the analyzer to find which Dart source files are actually used and skip copying all others. If files are imported they will be copied, no matter if the code is actually used. This is *no* tree-shaking mechanism.
-i, --include
Explicitly include files and directories of packages which are skipped when "skipUnused" is "true". For example resource files which are not referenced by any import statement. "include" is ignored when "skipUnused" is "false". The value needs to be a map as a valid JSON string. The key of the map is the name of the package and the value is a list of paths relative to the packages `lib` directory. Example `{'mypackage': ['config/logconfig.json']}`
-z, --[no-]create-zip
Create a ZIP archive file containing all files copied to the outputDirectory.
-n, --zip-name
The name of the created ZIP archive file. (defaults to "")
-h, --help
Print this usage information.
Call it from Dart code (like Grinder)
final options = new BuildOptions()
  ..createArchive = true;
new BuildServerDeployable(options).runAll();

For more control you can call call the individual tasks like

new BuildServerDeployable(options)

Another option is to extend BuildServerDeployable

class MyServerDeployable extends {
  void runAll() {
    // add your custom methods before/after/in between as required      
  // - add your own methods
  // - override methods


  • add introduction for deployable to the


  • Implement deployable command

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate pubs

2. Use it

The package has the following executables:

$ pubs

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pubs: ^0.1.1+2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:pubs/pubs.dart';
Version Uploaded Documentation Archive
0.2.0 Jul 15, 2015 Go to the documentation of pubs 0.2.0 Download pubs 0.2.0 archive
0.1.2 May 29, 2015 Go to the documentation of pubs 0.1.2 Download pubs 0.1.2 archive
0.1.1+5 May 26, 2015 Go to the documentation of pubs 0.1.1+5 Download pubs 0.1.1+5 archive
0.1.1+4 May 26, 2015 Go to the documentation of pubs 0.1.1+4 Download pubs 0.1.1+4 archive
0.1.1+3 May 26, 2015 Go to the documentation of pubs 0.1.1+3 Download pubs 0.1.1+3 archive
0.1.1+2 May 26, 2015 Go to the documentation of pubs 0.1.1+2 Download pubs 0.1.1+2 archive
0.1.1+1 May 25, 2015 Go to the documentation of pubs 0.1.1+1 Download pubs 0.1.1+1 archive
0.1.1 May 25, 2015 Go to the documentation of pubs 0.1.1 Download pubs 0.1.1 archive
0.1.0 May 25, 2015 Go to the documentation of pubs 0.1.0 Download pubs 0.1.0 archive
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]
Learn more about scoring.

This package version is not analyzed, because it is more than two years old. Check the latest stable version for its analysis.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0