trans2fw 0.0.1

使用pub global命令将文件包注册到全局 #

pub global activate --source path /Users/ryan/work/ali/github/flutter-study/flutter_web/tools

使用pub global run命令运行注册的脚本文件 #

pub global run testCom:main

使用pub global list命令查看全局包列表 #

pub global list

运行加参数的的示例 #

pub global run testCom:main -n go

创建html文件 #

pub global run testCom:creatHtml -t testTile -f test.html

可执行程序 #

  • 任何bin目录下的dart脚本可注册为可执行程序,分为两步:

  • 在pubspec.yaml中添加executables部分

executables: 包名: main # 要运行的脚本名称,(注意冒号后面的空格)如果有多个脚本,可以添加多个

通过pub global activate 全局注册 #

pub global activate --source path <包路径>

直接以包名为命令在命令行中输入即可执行。 #

z

  • 执行 main 程序就可以直接运行了 main

Use this package as a library

1. Depend on it

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


dependencies:
  trans2fw: ^0.0.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:trans2fw/trans2fw.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
20
Overall:
Weighted score of the above. [more]
32
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, other

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

Health issues and suggestions

Document public APIs. (-1 points)

6 out of 6 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/trans2fw.dart. (-6.78 points)

Analysis of lib/trans2fw.dart reported 14 hints, including:

line 9 col 8: Unused import: 'dart:async'.

line 11 col 8: Unused import: 'dart:convert'.

line 14 col 8: Unused import: 'package:path/path.dart'.

line 34 col 10: The value of the local variable 'select' isn't used.

line 59 col 9: Use isEmpty instead of length

Fix bin/testCom.dart. (-0.50 points)

Analysis of bin/testCom.dart reported 1 hint:

line 1 col 1: Prefer using /// for doc comments.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

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.

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 trans2fw.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
args ^1.5.2 1.5.2
console ^3.1.0 3.1.0
dart_inquirer ^1.0.0 1.0.0
path ^1.6.4 1.6.4
Transitive dependencies
vector_math 2.0.8