project_template 1.0.0 project_template: ^1.0.0 copied to clipboard
Tool to generate project templates for any programming language or framework.
project_template #
A tool to generate project templates and file trees for any programming language or framework.
Usage #
The package can be used as a command-line interface (CLI) or as a Dart library to be imported in other projects or other CLI tools.
CLI #
You can use the built-in command-line: project_template
To activate it globally:
$> dart pub global activate project_template
Now you can use the CLI directly:
$> project_template --help
To prepare a Template from a directory:
$> project_template prepare -d example/template-example -r ".DS_Store$" -o /tmp/template-x.json
- -d: The template directory.
- -r: A
RegExp
of a file path to ignore. - -o: The template file, to be used by
create
command (below).
To show information about a template:
$> project_template info -t /tmp/template-x.json
To create a file tree from a Template:
$> project_template create -t /tmp/template-x.json -p project_name_dir=foo -p project_name=Foo -p "project_description=Foo project." -p homepage=http://foo.com -o /tmp/project-x
- -t: The template file.
- -p: A template property/variable definition.
- -o: The output directory, where the project (file tree) will be generated.
Library Usage #
A simple library usage example:
import 'package:project_template/project_template.dart';
void main() async {
}
Features and bugs #
Please file feature requests and bugs at the issue tracker.
Author #
Graciliano M. Passos: gmpassos@GitHub.