publican 0.2.0

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

publican Pub Package Build Status

🧔 The package that will help you out with Dart's Pub 🎯

Getting started

Bring publican to your global dependencies:

pub global activate publican

Commands

I have an idea for a command

Documentation

publican init

Initializes a pubspec.yaml file.

mkdir my_awesome_app
cd  my_awesome_app
publican init

It will generate a pubspec.yaml file with the following defaults:

name: my_app
version: 0.1.0
description: My awesome Dart app

You can override default values throught the options:

-n, --name           (defaults to "my_app")
-v, --version        (defaults to "0.1.0")
-d, --description    (defaults to "My awesome Dart app")

Note: it will not override your current pubspec.yaml file, if you already have one, its safe.

publican add

Adds a dependency to pubspec.yaml file.

publican add angular angular_components

Publican will already look for the latest stable version:

name: my_app
version: 0.1.0
description: My awesome Dart app

dependencies:
  angular_components: ^0.8.0
  angular: ^4.0.0+2

⚠️ Also, it will not change your previous YAML structure definitions, that is a key difference from Publican to other similar packages.

The --dev flag will add the dependencies to dev_dependencies key

publican add --dev build_runner build_web_compilers
name: my_app
version: 0.1.0
description: My awesome Dart app

dependencies:
  angular_components: ^0.8.0
  angular: ^4.0.0+2

dev_dependencies:
  build_web_compilers: ^0.3.4+2
  build_runner: ^0.8.0

If you are not sure about the output, you can check it out before by adding the --dry-run flag, then it will print out what it would write.

You can also constraint a dependency to a specific version using an @ symbol:

publican add angular@^1.1.2+2

Want to try bleeding edge versions of you dependencies? Just add the -a or --alpha flag:

publican add -a angular
dependencies:
  angular: ^5.0.0-alpha+8

BSD 3-Clause License

Copyright (c) 2018, Leo Cavalcante All rights reserved.

0.2.0

  • Ready for Dart 2 and example added.

example/publican.dart

import 'dart:async';
import 'dart:io';

import 'package:args/command_runner.dart';
import 'package:publican/publican.dart';

Future<void> main() async {
  final File pubspec = new File('pubspec.yaml');

  final CommandRunner runner =
      new CommandRunner('publican_example', 'Publican example')
        ..addCommand(new InitCommand(pubspec))
        ..addCommand(new AddCommand(pubspec));

  await runner.run(['init']);
}

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate publican

2. Use it

The package has the following executables:


$ publican

Use this package as a library

1. Depend on it

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


dependencies:
  publican: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:publican/publican.dart';
  
Version Uploaded Documentation Archive
0.2.0 Sep 15, 2018 Go to the documentation of publican 0.2.0 Download publican 0.2.0 archive
0.1.4 Sep 14, 2018 Go to the documentation of publican 0.1.4 Download publican 0.1.4 archive
0.1.3 Mar 25, 2018 Go to the documentation of publican 0.1.3 Download publican 0.1.3 archive
0.1.2 Mar 25, 2018 Go to the documentation of publican 0.1.2 Download publican 0.1.2 archive
0.1.1 Mar 24, 2018 Go to the documentation of publican 0.1.1 Download publican 0.1.1 archive
0.1.0 Mar 24, 2018 Go to the documentation of publican 0.1.0 Download publican 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
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: Flutter, other

Primary library: package:publican/publican.dart with components: io.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
args ^1.5.0 1.5.1
http ^0.11.3+17 0.11.3+17 0.12.0
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.6
path 1.6.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
Dev dependencies
test ^1.3.2
yaml ^2.1.13