pubspec 0.0.9

  • Readme
  • Changelog
  • Example
  • Installing
  • 43

pubspec #

A library for manipulating pubspec files.

Usage #

A simple usage example:

import 'package:pubspec/pubspec.dart';

main() {
  // load it
  var pubSpec = await PubSpec.load(myDirectory);

  // change the dependencies to a single path dependency on project 'foo'
  var newPubSpec = pubSpec.copy(dependencies: { 'foo': new PathReference('../foo') });

  // save it

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.0.9 #

  • Bug Fix. publish_to was serialising to publishTo

0.0.8 #

  • upgraded some dependencies

0.0.7 #

  • add publish_to

0.0.6 #

  • tidy dependencies

0.0.3 #

  • Added property allDependencies which combines dependencies with devDependencies

0.0.2 #

  • Added == and hashCode to dependency reference classes

0.0.1 #

  • Initial version, created by Stagehand


// Copyright (c) 2015, Anders Holmgren. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library pubspec.example;

main() {}

Use this package as a library

1. Depend on it

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

  pubspec: ^0.0.9

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:pubspec/pubspec.dart';
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.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


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