Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rbcprolabs/dpm
📦 Dart Package Manager
https://github.com/rbcprolabs/dpm
dart dpm flutter package-manager pub
Last synced: 9 days ago
JSON representation
📦 Dart Package Manager
- Host: GitHub
- URL: https://github.com/rbcprolabs/dpm
- Owner: rbcprolabs
- License: mit
- Created: 2019-07-23T08:31:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-27T16:34:28.000Z (about 5 years ago)
- Last Synced: 2024-07-26T19:00:56.476Z (4 months ago)
- Topics: dart, dpm, flutter, package-manager, pub
- Language: Dart
- Homepage: https://pub.dev/packages/dpm
- Size: 1.38 MB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Run commands upon installing & upgrades packages, powerful package management with CLI. Flutter compatible!
Features •
How to use •
Available Commands# Features
- Lightweight
- Productive development
- Fast!# How to use
```bash
$ 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:```yaml
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:
```bash
$ dpm build
```# Available Commands
* [add](#add)
* [remove](#remove)
* [get](#get)
* [init](#init)
* [upgrade](#upgrade)## Add
Can be used to install dependencies without having to search
the Pub directory for the current version.```bash
# 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 [email protected]+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.```bash
# 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`.