leancode_contracts_generator

Last updated:

0 purchases

leancode_contracts_generator Image
leancode_contracts_generator Images
Add to Cart

Description:

leancode contracts generator

leancode_contracts_generator #


Installation #
dart pub add leancode_contracts_generator --dev
copied to clipboard
Usage #
First run will take longer due to the need to download external dependencies.
CLI #
First initialize a config file filled with defaults with dart run leancode_contracts_generator init, then generate client contracts code with dart run leancode_contracts_generator.
$ dart run leancode_contracts_generator --help
Command line utility for generating dart CQRS contracts

Usage: leancode_contracts_generator <command> [arguments]

Global options:
-h, --help Print this usage information.

Available commands:
init Initialize a config file

Run "leancode_contracts_generator help <command>" for more information about a command.
copied to clipboard
Library #
import 'dart:io';

import 'package:leancode_contracts_generator/leancode_contracts_generator.dart';

Future<void> main(List<String> arguments) async {
final generator = ContractsGenerator(
ContractsGeneratorConfig(
input: GeneratorScript.path(['ExampleContracts/**']),
name: 'cool_name',
output: Directory('lib'),
extra: '// :)',
include: RegExp(r'\w+(\.\w+)*'),
),
);

await generator.writeAll();
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.