Giter Club home page Giter Club logo

bootscaf's Introduction

Bootscaf

Build Status

Bootscaf is a ruby gem that turns the default rails generate scaffolds into fully bootstrappified scaffolds.

Read more in the original blog post.

Installation

Get it going in your Gemfile:

    gem 'bootscaf', group: :development

Install it with bundle from your command line:

bundle

Usage

Run the bootscaf binary on a single scaffold (e.g. users) from your rails project's base directory:

bootscaf update NNNs

OR Run bootscaf binary on all scaffolds:

bootscaf update --all

Of course, get help any time simply by running the naked bootscaf binary:

bootscaf

Examples

Run the bootscaf binary on a Post scaffold/model:

bootscaf update posts

Extras

There are a few conveniences added that we use in the vast majority of our projects. They are:

  1. Helper css class names on the <body> element for page-specific CSS: 
<body class="controller-<%= controller.controller_name.dasherize %> action-<%= controller.action_name.dasherize %>">
  1. Google analytics if an environment variable is set:
ENV["GOOGLE_ANALYTICS_ID"]
  1. A click-to-select css selector for read-only inputs:
<input class="select-all-on-click" type="text" value="long value" readonly>
  1. Page <title>s set in views:
<% content_for :page_title do %>
Edit Model — 
<% end %>

And that’s about it, for now!

Running Tests

bundle exec rspec spec

Contributing

  1. Fork it ( https://github.com/thrivesmart/bootscaf/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

bootscaf's People

Contributors

moorage avatar

Watchers

James Cloos avatar Rob Boling avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.