Repository is archived
No release in over a year
A utility for generating new extensions or component libraries which hook into `amber_component`. Create your own themes!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

license CI badge Coverage Badge

AmberExtensionGenerator

This library serves as a generator of amber_component component packs or extensions.

Installation

$ gem install amber_extension_generator

Usage

You can generate a new component pack like so

$ amber_extension_generator new my_library_name

This will create a new gem in my_library_name named my_library_name. It has all the information on how to use it and develop it in its README.md.

It is generated with a dummy Rails app configured to hot-reload the gem. This makes it possible to incredibly easy test your components in practice.

There is a custom test suite which makes it extremely easy to unit test components by querying the generated HTML with special assertions.

More details can be found at amber_component.

Development

Setup

To setup this gem for development you should run the setup script. This should install all dependencies and make the gem ready.

$ bin/setup

Generating a gem

You can quickly generate a gem for development purposes by running

$ bin/generate_gem

The generated gem will be located in the tmp folder.

Console

To make development and experimenting easier there is a script that lets you access an IRB with this entire gem preloaded.

$ bin/console

Tests

You can run all tests like this.

$ bundle exec rake test

Release

To release a new version, update the version number in version.rb, and then run

$ bundle exec rake release

This will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Local installation

To install this gem onto your local machine, run

$ bundle exec rake install

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/amber-ruby/amber_extension_generator.

License

The gem is available as open source under the terms of the MIT License.

Acknowledgement

This component pack generator is powered by amber_component.