pubspec2 4.0.0 copy "pubspec2: ^4.0.0" to clipboard
pubspec2: ^4.0.0 copied to clipboard

discontinuedreplaced by: pubspec_manager

A library for manipulating pubspec.yaml files. This is a place holder until the pubspec library is updated with PR

pubspec #

A library for manipulating pubspec files.

Usage #

A simple usage example:

import 'package:pubspec2/pubspec.dart';

main() async {
  // 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': PathReference('../foo') });

  // save it
  await newPubSpec.save(myDirectory);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

2
likes
150
pub points
35%
popularity

Publisher

verified publisheronepub.dev

A library for manipulating pubspec.yaml files. This is a place holder until the pubspec library is updated with PR

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

meta, path, pub_semver, yaml, yaml_extension

More

Packages that depend on pubspec2