butter_cli 0.3.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

butter_cli #

pub package Build Status

Generates the butter framework scaffolding for flutter development.

Getting Started #

Install the butter_cli using the following command:

pub global activate butter_cli

Usage #

Usage: butter_cli [<options>] --destination <destination>

Generates the butter framework scaffolding.

Options:
--help or -h
  Show this information
--model or -o
  The name of the default model to use usually in generating an action. Use a lowercase_with_underscores.
--module or -m
  The name of the module. Use a lowercase_with_underscores.
--name or -n
  The name of the object under a module. Specify this when generating
  a page or an action. Use a lowercase_with_underscores.
--skeleton or -s
  Generates the skeletal files of the framework under lib and test
--type <item> or -t <item>
  Where <item> is any of: module, page, action.
  When generating a page. A state and model is provided along with it.

To generate a project skeleton: 
 butter_cli -s -d /path/to/project

To generate a module: 
 butter_cli -t module -m home -d /path/to/project

To generate a page: 
 butter_cli -t page -m profile -n edit_profile -d /path/to/project

To generate an action: 
 butter_cli -t action -m profile -o user_profile -n edit_profile -d /path/to/project

0.3.0 #

  • Fixed errors in creating a skeletong project
  • Add butter in pubspec of skeleton project

0.2.0 #

  • Added shorthand methods in app.template
  • Specify the default model when generating an action

0.1.4 #

  • Automatically retrieve the latest package version in pub-cache

0.1.3 #

  • Fix pub-cache path issue in action, module, and page generators

0.1.2 #

  • Fix pub-cache path

0.1.1 #

  • Fix version setting

0.1.0 #

  • Increment minor version
  • Add repository to pubspec

0.0.7 #

  • Transfer the templates to the lib directory
  • Access template files in pub-cache

0.0.6 #

  • Transfer the templates to the bin directory

0.0.5 #

  • Rename app.dart to app_config.dart in assets/lib/config

0.0.4 #

  • Update butter logo

0.0.3 #

  • Fix various health issues and suggestions reported by pub.dev

0.0.2 #

  • Made a correction on the help info

0.0.1 #

  • Initial version

example/main.dart

import 'package:args/args.dart';
import 'package:butter_cli/butter_cli.dart';

void main(List<String> arguments) {
  final parser = ArgParser();
  parser.addOption('destination', abbr: 'd');
  var results = parser.parse(arguments);

  Scaffolding(results['destination']).generate();
}

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate butter_cli

2. Use it

The package has the following executables:


$ butter_cli

Use this package as a library

1. Depend on it

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


dependencies:
  butter_cli: ^0.3.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:butter_cli/butter_cli.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
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]
50
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15

Analysis suggestions

Package not compatible with SDK flutter

Because it is not compatible with any of the supported runtimes: flutter-native, flutter-web

Package not compatible with runtime flutter-native on Android

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on Linux

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on Windows

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on iOS

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on macOS

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-web on Web

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime js

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Package not compatible with runtime native-aot

Because:

  • package:butter_cli/butter_cli.dart that imports:
  • package:butter_cli/src/scaffolding.dart that imports:
  • package:butter_cli/src/template_engine.dart that imports:
  • package:mustache/mustache.dart that imports:
  • package:mustache/src/template.dart that imports:
  • package:mustache/src/renderer.dart that imports:
  • dart:mirrors

Health issues and suggestions

Document public APIs. (-1 points)

44 out of 44 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

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

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

line 3 col 8: Unused import: 'package:butter_cli/src/config.dart'.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
args ^1.6.0 1.6.0
io ^0.3.4 0.3.4
mustache ^1.1.1 1.1.1
path ^1.6.0 1.7.0
pub_cache ^0.2.3 0.2.3
recase ^3.0.0 3.0.0
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
meta 1.2.2 1.3.0-nullsafety
pub_semver 1.4.4
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
yaml 2.2.1
Dev dependencies
pedantic ^1.8.0
test ^1.6.0