Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 666 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 666 Bytes

pubspec

A library for manipulating pubspec files.

Usage

A simple usage example:

import 'package:pubspec/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': new PathReference('../foo') });

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

Features and bugs

Please file feature requests and bugs at the issue tracker.