dpm 0.2.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 50
Logo

Run commands upon installing & upgrades packages, powerful package management with CLI. Flutter compatible!

Pub

FeaturesHow to useAvailable Commands

Features #

  • Lightweight
  • Productive development
  • Fast!

How to use #

$ pub global activate dpm

To use packages that integrate with dpm, you should run dpm get instead of pub get. Then, all installed packages will have their get dpm run.

Also replace pub upgrade with dpm upgrade. This will run get dpm as well.

You can run dpm link to link executables into .dpm_bin.

Running your own scripts #

It is very likely that you want to run your own scripts during development, or upon package installation. To do so, edit your pubspec.yaml as follows:

name: foo
# ...
scripts:
  build: gcc -o foo src/foo.cc
  post_get:
    - dart_gyp configure
    - dart_gyp build
  post_upgrade: echo ":)"

Installed dev dependencies with executables will automatically be filled in to the PATH during script execution.

Then, in your project root, you can run:

$ dpm build

Available Commands #

Add #

Can be used to install dependencies without having to search the Pub directory for the current version.

# Install the newest version, and apply caret syntax
$ dpm add my-package

# Install a specific version
$ dpm add my-package@^1.0.0
$ dpm add my-package@0.0.4+25
$ dpm add "my-package@>=2.0.0 <3.0.0"

# Install a Git dependency
$ dpm add my-package@git://path/to/repo.git

# Specify a commit or ref
$ dpm add my-package@git://path/to/repo.git#bleeding-edge

# Install a local package
$ dpm add my-package@path:/Users/john/Source/Dart/pkg

# Install multiple packages
$ dpm add my-package my-other-package yet-another-package

# Install to dev_dependencies
$ dpm add --dev http test my-package@git://repo#dev

# Preview `pubspec.yaml`, without actually installing dependencies,
# or modifying the file.
$ dpm add --dry-run my-experimental-package

Remove #

Can be used to remove dependencies without need go to file.

# Remove specific package 
$ dpm remove my-package 

# Remove multiple packages
$ dpm remove my-package my-other-package

Get #

This script simply runs pub get.

init #

Essentially an npm init for Dart. This command will run you through a series of prompts, after which a pubspec.yaml will be generated for you.

Upgrade #

This script simply runs pub upgrade.

0.2.3 #

0.2.2 #

  • Fixed script run error on *unix systems (#3)

0.2.1 #

  • Update flutter check method

0.2.0 #

  • Fixed conlose colors
  • Updated run mechanism, now you can run dev_dependency example: dpm font_generator --from ... and can run dev_dependency with special executables: dpm font_generator:executable_name --from ...

0.1.3 #

  • Remove unused dependency

0.1.2 #

  • Added example

0.1.1 #

  • Fix flutter {get,update} capability

0.1.0 #

  • Updated readme, fixed getting, upgrading & linking packages

0.0.2 #

  • Restore functionality

0.0.1 #

  • Initial release

example/example.md

Available Commands #

Add #

Can be used to install dependencies without having to search the Pub directory for the current version.

# Install the newest version, and apply caret syntax
$ dpm add my-package

# Install a specific version
$ dpm add my-package@^1.0.0
$ dpm add my-package@0.0.4+25
$ dpm add "my-package@>=2.0.0 <3.0.0"

# Install a Git dependency
$ dpm add my-package@git://path/to/repo.git

# Specify a commit or ref
$ dpm add my-package@git://path/to/repo.git#bleeding-edge

# Install a local package
$ dpm add my-package@path:/Users/john/Source/Dart/pkg

# Install multiple packages
$ dpm add my-package my-other-package yet-another-package

# Install to dev_dependencies
$ dpm add --dev http test my-package@git://repo#dev

# Preview `pubspec.yaml`, without actually installing dependencies,
# or modifying the file.
$ dpm add --dry-run my-experimental-package

Remove #

Can be used to remove dependencies without need go to file.

# Remove specific package 
$ dpm remove my-package 

# Remove multiple packages
$ dpm remove my-package my-other-package

Get #

This script simply runs pub get.

init #

Essentially an npm init for Dart. This command will run you through a series of prompts, after which a pubspec.yaml will be generated for you.

Upgrade #

This script simply runs pub upgrade.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate dpm

2. Use it

The package has the following executables:


$ dpm

Use this package as a library

1. Depend on it

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


dependencies:
  dpm: ^0.2.3

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

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: other

Primary library: package:dpm/dpm.dart with components: io, mirrors.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0-dev.0.5 <3.0.0
args ^1.5.2 1.5.2
console ^3.1.0 3.1.0
http ^0.12.0+2 0.12.0+2
meta ^1.1.7 1.1.7
path ^1.6.2 1.6.4
pub_semver ^1.4.2 1.4.2
pubspec ^0.1.2 0.1.2
register ^1.0.0 1.0.1
tuple ^1.0.2 1.0.3
yaml ^2.1.16 2.2.0
yamlicious ^0.1.0 0.1.0
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
matcher 0.12.5
quiver 2.0.5
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
stuff 0.1.0
term_glyph 1.1.0
typed_data 1.1.6
uri 0.11.3+1
utf 0.9.0+5
vector_math 2.0.8
Dev dependencies
pedantic ^1.8.0+1 1.8.0+1
test ^1.6.5