43 lines
		
	
	
		
			913 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			913 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
# Dart - Brick Generator
 | 
						|
 | 
						|
A simple command-line application which allows to generate the template of a brick from a project which compiles. 
 | 
						|
 | 
						|
With an entrypoint in `bin/`, library code in `lib/`.
 | 
						|
 | 
						|
## How to use
 | 
						|
 | 
						|
 | 
						|
- Add your app in `apps/`.
 | 
						|
- Add `brick_config.yaml` in you app folder and add this fields:
 | 
						|
 | 
						|
> Here we have created `wyatt_feature_brick` app in `apps/`
 | 
						|
 | 
						|
```yaml
 | 
						|
name: wyatt_feature_brick
 | 
						|
description: New feature brick including state mananement
 | 
						|
path_to_brickify: lib/feature_name
 | 
						|
 | 
						|
version: 0.1.1
 | 
						|
 | 
						|
vars:
 | 
						|
  feature_name:
 | 
						|
    type: string
 | 
						|
    name: feature_name
 | 
						|
    description: Name of the feature
 | 
						|
    default: Dash
 | 
						|
    prompt: What is the name of your new feature
 | 
						|
```
 | 
						|
 | 
						|
then run command with project path
 | 
						|
 | 
						|
```sh
 | 
						|
dart tools/brick_generator/bin/brick_generator.dart ./apps/wyatt_feature_brick
 | 
						|
```
 | 
						|
 | 
						|
## TODO
 | 
						|
 | 
						|
- [ ] bool variables
 | 
						|
- [ ] enum variables
 | 
						|
- [ ] array variables
 | 
						|
- [ ] pre hooks
 | 
						|
- [ ] post hooks |