pubspec 0.1.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 73

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
  await newPubSpec.save(myDirectory);
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.1.1

  • load from file
  • replace deprecated isInstanceOf

0.1.0

  • Dart 2

0.0.11

  • additional constructor

0.0.10

  • tidied a few things

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

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.

library pubspec.example;

main() {}

Use this package as a library

1. Depend on it

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


dependencies:
  pubspec: ^0.1.1

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';
  
Version Uploaded Documentation Archive
0.1.1 Oct 8, 2018 Go to the documentation of pubspec 0.1.1 Download pubspec 0.1.1 archive
0.1.0 Oct 2, 2018 Go to the documentation of pubspec 0.1.0 Download pubspec 0.1.0 archive
0.0.15 Jan 29, 2018 Go to the documentation of pubspec 0.0.15 Download pubspec 0.0.15 archive
0.0.14 Jun 25, 2016 Go to the documentation of pubspec 0.0.14 Download pubspec 0.0.14 archive
0.0.13 Apr 4, 2016 Go to the documentation of pubspec 0.0.13 Download pubspec 0.0.13 archive
0.0.12 Apr 2, 2016 Go to the documentation of pubspec 0.0.12 Download pubspec 0.0.12 archive
0.0.11 Mar 26, 2016 Go to the documentation of pubspec 0.0.11 Download pubspec 0.0.11 archive
0.0.10 Mar 25, 2016 Go to the documentation of pubspec 0.0.10 Download pubspec 0.0.10 archive
0.0.9 Jan 24, 2016 Go to the documentation of pubspec 0.0.9 Download pubspec 0.0.9 archive
0.0.8 Jan 23, 2016 Go to the documentation of pubspec 0.0.8 Download pubspec 0.0.8 archive

All 21 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: other

Primary library: package:pubspec/pubspec.dart with components: io, mirrors.

Health suggestions

Fix lib/src/dependency.dart. (-1 points)

Analysis of lib/src/dependency.dart reported 2 hints:

line 113 col 17: Always override hashCode if overriding ==.

line 132 col 17: Always override hashCode if overriding ==.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
path ^1.6.2 1.6.2
pub_semver ^1.4.2 1.4.2
stuff ^0.1.0 0.1.0
yaml ^2.1.15 2.1.15
yamlicious ^0.1.0 0.1.0
Transitive dependencies
charcode 1.1.2
collection 1.14.11
matcher 0.12.4
meta 1.1.6
quiver 2.0.1
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.4
uri 0.11.3+1
utf 0.9.0+5
Dev dependencies
test ^1.3.3