cage_cli 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 48

Cage - CLI ยท GitHub license Pub Package Build Status codecov

Command line interface for cage framework. Avoids tedious work by generating source files.

Installation #

To install and update:

pub global activate cage_cli

Usage #

cage help

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.1.0] - 2019-07-11

Changed #

  • Code fixes for Dart 2.4.0
  • Code cleanups for pub
  • Updated dependencies

Fixes #

  • Test runs

[0.0.2]

  • Minor adjustments for pub.

[0.0.1]

  • Initial beta release for testing.

example/cage_cli.dart

import 'package:cage_cli/cage_cli.dart';

final CageCliRunner runner = CageCliRunner();

void main() {
  _genModules();
  _genServices();
  _genWidgets();
}

void _genModules() {
  // generate module in /lib/src/test_module.dart
  runner.run(['generate', 'module', 'test']);
  // generate module in /lib/src/test/test_module.dart
  runner.run(['generate', 'module', 'test/test']);
}

void _genServices() {
  // generate service in /lib/src/test_service.dart
  runner.run(['generate', 'service', 'test']);
  // generate service in /lib/src/test/_services/test_service.dart
  runner.run(['generate', 'service', 'test/_services/test']);
}

void _genWidgets() {
  // generate widget source files in /lib/src
  // -> test.dart
  // -> test_meta.dart
  // -> test_presenter.dart
  // -> test_view.dart
  runner.run(['generate', 'widget', 'test']);
}

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate cage_cli

2. Use it

The package has the following executables:


$ cage_cli

Use this package as a library

1. Depend on it

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


dependencies:
  cage_cli: ^0.1.0

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:cage_cli/cage_cli.dart';
  
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]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

We analyzed this package on Nov 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: other

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

Health suggestions

Fix lib/src/generator.dart. (-0.50 points)

Analysis of lib/src/generator.dart reported 1 hint:

line 92 col 7: Use rethrow to rethrow a caught exception.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (test_coverage).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
args ^1.5.2 1.5.2
dart_style ^1.2.9 1.3.3
logging ^0.11.3+2 0.11.3+2
meta ^1.1.7 1.1.8
mustache ^1.1.1 1.1.1
path ^1.6.2 1.6.4
resource ^2.1.6 2.1.6
test_coverage ^0.3.0+1 0.3.0+1 0.4.0
yaml ^2.1.16 2.2.0
Transitive dependencies
_fe_analyzer_shared 1.0.0
analyzer 0.39.1
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
coverage 0.12.4 0.13.3+1
crypto 2.1.3
csslib 0.16.1
front_end 0.1.29
glob 1.2.0
html 0.14.0+3
js 0.6.1+1
json_annotation 3.0.0
json_rpc_2 2.1.0
kernel 0.3.29
lcov 5.4.0
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
pedantic 1.8.0+1
pub_semver 1.4.2
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vm_service_client 0.2.6+3
watcher 0.9.7+12
web_socket_channel 1.1.0
Dev dependencies
test ^1.6.5