jaguar_generator 2.4.5

jaguar-generator #

Generates Controller installers.

Usage #

Add build_runner dependencies: #

pubspec.yaml:

dependencies:
  jaguar:

dev_dependencies:
  build_runner:
  jaguar_generator:

Declare Controller class #

lib/example.dart:

import 'package:jaguar/jaguar.dart';

part 'example.jroutes.dart';

@GenController(path: "/simple")
class SimpleApi extends Controller with _$SimpleApi {
  @Get()
  String get(_) => "simple";
}

Generate Controller installer #

pub run build_runner build

A file named lib/example.jroutes.dart will be generated with Controller installer class _$SimpleApi.

Changelog #

2.4.4 #

  • Support for responseProcessor

2.4.2 #

  • Support for IncludeController

2.4.1 #

  • Basic support for GenController

example/README.md

A sample command-line application.

Created from templates made available by Stagehand under a BSD-style license.

Use this package as a library

1. Depend on it

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


dependencies:
  jaguar_generator: ^2.4.5

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:jaguar_generator/builder.dart';
import 'package:jaguar_generator/common/constants.dart';
import 'package:jaguar_generator/generator/generator.dart';
import 'package:jaguar_generator/models/models.dart';
import 'package:jaguar_generator/models/route.dart';
import 'package:jaguar_generator/parser/parser.dart';
import 'package:jaguar_generator/writer/writer.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
2
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
65
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

We analyzed this package on Jul 13, 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: other

Platform components identified in package: build, io, mirrors.

Health issues and suggestions

Document public APIs. (-0.30 points)

41 out of 42 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.

Maintenance issues and suggestions

Support latest dependencies. (-30 points)

The version constraint in pubspec.yaml does not support the latest published versions for 3 dependencies (analyzer, build, source_gen).

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65 <3.0.0
analyzer ^0.33.0 0.33.6+1 0.37.0
build ^1.0.0 1.1.0 1.1.4
jaguar ^2.4.19 2.4.36
logging ^0.11.0 0.11.3+2
meta ^1.1.5 1.1.7
source_gen ^0.9.0 0.9.4+1 0.9.4+2
Transitive dependencies
args 1.5.2
async 2.2.0
auth_header 2.1.4
charcode 1.1.2
convert 2.1.1
crypto 2.0.6
csslib 0.16.1
dart_style 1.2.0 1.2.9
front_end 0.1.6+9 0.1.20
glob 1.1.7
html 0.14.0+2
http_server 0.9.8+3
jaguar_common 2.1.4
jaguar_serializer 2.2.12
kernel 0.3.6+9 0.3.20
mime 0.9.6+3
package_config 1.0.5
path_tree 2.2.2
pedantic 1.8.0+1
plugin 0.2.0+3
pub_semver 1.4.2
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.1.16
Dev dependencies
build_runner ^1.0.0
collection ^1.14.10 1.14.11
path ^1.6.2 1.6.2
test ^1.3.0

Admin