pubspec 2.0.1
pubspec: ^2.0.1 copied to clipboard

This version is a place holder until pubspec is published with nnbd support. A library for manipulating [pubspec](https://www.dartlang.org/tools/pub/pubspec.html) files

example/pubspec.dart

// 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.

import 'dart:io';
import 'package:pubspec/pubspec.dart';

main() async {
  // specify the directory
  var myDirectory = Directory('myDir');
  ;

  // load pubSpec
  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);
}
7
likes
100
pub points
85%
popularity

Publisher

theconduit.dev

This version is a place holder until pubspec is published with nnbd support. A library for manipulating [pubspec](https://www.dartlang.org/tools/pub/pubspec.html) files

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

path, pub_semver, uri, yaml

More

Packages that depend on pubspec