Skip to content

firstdraft/dev_toolbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevToolbar

First Draft DevToolbar for appdev-projects beginner ergonomics in Rails applications.

Installation

Add this line to your application's Gemfile:

group :development do
  gem "dev_toolbar"
end

Then execute:

bundle install

Then, add a configuration file with the names and routes you want links for:

# config/initializers/dev_toolbar.rb

if Rails.env.development?
  DevToolbar.configure do |config|
    config.links = [
      { name: "Routes", path: "/rails/info/routes" },
      { name: "Database", path: "/rails/db" }, # rails_db gem must be installed
      { name: "ERD", path: "/erd" }, # erd.png must be in the root folder
      # etc.
    ]
  end
end

Include the JavaScript:

# config/importmap.rb
pin "dev_toolbar", to: "dev_toolbar/index.js"
pin "dev_toolbar/toolbar", to: "dev_toolbar/toolbar.js"

```js
// app/javascripts/application.js
import "dev_toolbar"

Include the CSS:

/* app/assets/stylesheets/application.css */
@import url("dev_toolbar.css");

These routes will now appear on every page in your app while in development.

Updating the gem

  1. Pull request and make changes
  2. Test locally
  3. Bump lib/dev_toolbar/version.rb
  4. gem build dev_toolbar.gemspec
  5. gem push dev_toolbar-X.X.X.gem

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/firstdraft/dev_toolbar.

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors