0.0
No commit activity in last 3 years
No release in over 3 years
An html2haml wrapper for converting html templates to haml templates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 10.0

Runtime

~> 2.2
~> 0.20
 Project Readme

Myhtml2haml

A html2haml wrapper for converting html templates to haml templates.

Disclaimer

use at your own risk! I am not responsible if anything goes wrong while using this gem. If you are not sure it will work for you, install it on a vagrant vm and give it a try there. The Vagrantfile that is in this repo will take care of configuring a useable vm.

Usage

myhtml2haml - displays the help menu

myhtml2haml convert - safe file conversion (does not delete original files

myhtml2haml covert --pattern=[.erb|.html] - Converts files with .html.erb extension to .html.haml

Will match .erb, .html.erb, .html, and .rhtml

Alias -p for --pattern

myhtml2haml covert --dir_prefix - Converts files appending parent directory name to the converted files

Given the file app/index.html.erb the output would be app/app_index.html.haml

Alias -d for --dir_prefix

myhtml2haml convert --obliviate=true - Dangerous conversion (deletes original files)

Alias -o for --obliviate

myhtml2haml reset - Remove ALL haml files BE CAREFULL!!!!

Installation

Add this line to your application's Gemfile:

gem 'myhtml2haml'

And then execute:

$ bundle

Or install it yourself as:

$ gem install myhtml2haml

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Releasing

To release a new version,

  • update the version number in version.rb
  • tag the the code git tag v1.0.0
  • push the tag git push --tags
  • then run bundle exec rake build
  • gem push pkg/myhtml2haml-version

Which will push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/vmcilwain/myhtml2haml. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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