https://github.com/alexwayfer/flame_app_generator
Generator for Flame web applications
https://github.com/alexwayfer/flame_app_generator
Last synced: about 1 year ago
JSON representation
Generator for Flame web applications
- Host: GitHub
- URL: https://github.com/alexwayfer/flame_app_generator
- Owner: AlexWayfer
- License: mit
- Created: 2023-11-06T08:54:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T16:13:08.000Z (about 1 year ago)
- Last Synced: 2025-04-09T22:08:47.568Z (about 1 year ago)
- Language: Ruby
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Flame App Generator
[](https://cirrus-ci.com/github/AlexWayfer/flame_app_generator)
[](https://codeclimate.com/github/AlexWayfer/flame_app_generator/code)
[](https://codeclimate.com/github/AlexWayfer/flame_app_generator)
[](https://depfu.com/repos/github/AlexWayfer/flame_app_generator)
[](LICENSE.txt)
[](https://rubygems.org/gems/flame_app_generator)
Gem for new [Flame](https://github.com/AlexWayfer/flame) web applications generation.
It was created for myself, but you can suggest options for generation to adopt it for your usage.
## Installation
Install it globally:
```shell
gem install flame_app_generator
```
## Usage
### With local template
```sh
flame_app_generator name_of_a_new_app path/to/template
```
### With GitHub template
```sh
flame_app_generator name_of_a_new_app template_github_org/template_github_repo --git
```
Be aware: `flame_app_generator` uses `template/` directory from the GitHub repo, not the root one.
### With custom project name
It can be used instead of camelized app name, for example:
```sh
flame_app_generator foobar path/to/template --project-name=FooBar
```
### With custom domain
It can be used instead of default `.com` domain, for example:
```sh
flame_app_generator foobar path/to/template --domain=foo-bar.dev
```
## Template creation
Example of gem template you can see at [AlexWayfer/flame_app_template](https://github.com/AlexWayfer/flame_app_template).
Available paths:
| Path part | Example of source | Example of result |
| ---------- | ----------------- | ----------------- |
| `app_name` | `app_name.rb` | `foo_bar.rb` |
Any `*.erb` file will be rendered via [ERB](https://ruby-doc.org/stdlib/libdoc/erb/rdoc/ERB.html);
if you want an `*.erb` file as result — name it as `*.erb.erb` (even if there are no tags).
Available variables:
| Variable | Example of result | Default |
| ------------------- | ------------------ | ------------------------------- |
| `name`, `app_name` | `foo_bar` | _required_ |
| `module_name` | `FooBar` | camelized app name |
| `short_module_name` | `FB` | upcased chars from module name |
| `domain_name` | `foobar.com` | downcased module name + `.com` |
| `indentation` | `tabs` or `spaces` | `tabs` (it's easier to convert) |
By default indentation is `tabs`, but if a template spaces-indented — option will not affect.
So, this option only for tabs-indented templates.
### Git templates
You can create public git-templates and then guide users to call
`flame_app_generator app_name your_org/your_repo --git`,
but be aware that `flame_app_generator` will look for template inside `template/` directory
to allow you having out-of-template README, specs (for the template itself), anything else.
## Development
After checking out the repo, run `bundle install` to install dependencies.
Then, run `bundle exec rspec` to run the tests.
To install this gem onto your local machine, run `toys gem install`.
To release a new version, run `toys gem release %version%`.
See how it works [here](https://github.com/AlexWayfer/gem_toys#release).
## Contributing
Bug reports and pull requests are welcome
on [GitHub](https://github.com/AlexWayfer/flame_app_generator).
## License
The gem is available as open source under the terms of the
[MIT License](https://opensource.org/licenses/MIT).