shellcommand 0.1.1

  • Readme
  • Changelog
  • Installing
  • 38

shellcommand #

Helper for executing commands on the commandline

Usage #

class Git extends ShellCommand {
    Git() : super("git");
}

void main(List<String> arguments) async {
    final git = Git();
    
    if(!(await git.exists)) {
        print("git is not installed - please install it via 'apt install git'!");
        return;
    }

    final result = await git.run([ "--help" ]);
    if(result.exitCode != 0) {
        print("ExitCode: ${exitCode}!");
        print(result.stderr);
    } else {
        print(result.stdout);
    }
}

Another example can be found on GitHub

If you have problems #

License #

Copyright 2018 Michael Mitterer (office@mikemitterer.at), 
IT-Consulting and Development Limited, Austrian Branch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, 
software distributed under the License is distributed on an 
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
either express or implied. See the License for the specific language 
governing permissions and limitations under the License.


Change Log for shellcommand #

Helper for calling system binaries

Unreleased #

Docs #

This CHANGELOG.md was generated with Changelog for Dart

Use this package as a library

1. Depend on it

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


dependencies:
  shellcommand: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:shellcommand/shellcommand.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
43
Overall:
Weighted score of the above. [more]
38
Learn more about scoring.

We analyzed this package on Nov 15, 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: Flutter, other

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

Health suggestions

Fix lib/shellcommand.dart. (-1.99 points)

Analysis of lib/shellcommand.dart reported 4 hints:

line 62 col 42: Use = to separate a named parameter from its default value.

line 63 col 28: Use = to separate a named parameter from its default value.

line 64 col 36: Use = to separate a named parameter from its default value.

line 65 col 36: Use = to separate a named parameter from its default value.

Format bin/runCommands.dart.

Run dartfmt to format bin/runCommands.dart.

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 (where).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-17.26 points)

The package was last published 61 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and shellcommand.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
logging >=0.11.3 <1.0.0 0.11.3+2
validate ^1.0.0 1.7.0
where ^4.3.0 4.4.0 6.4.0
Transitive dependencies
args 1.5.2
build_cli_annotations 1.1.0
meta 1.1.8
path 1.6.4
Dev dependencies
build_runner any
build_test any
console_log_handler >=1.1.0 <2.0.0
test any