Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/layui. To experiment with that code, run bin/console for an interactive prompt.
TODO: Delete this and the text above, and describe your gem
Add this line to your application's Gemfile:
gem 'layui'And then execute:
$ bundle install
and restart your server to make the files available through the pipeline.
Or install it yourself as:
$ gem install layui
Import Bootstrap styles in app/assets/stylesheets/application.scss:
@import "layui";Make sure the file has .scss extension (or .sass for Sass syntax). If you have just generated a new Rails app,
it may come with a .css file instead. If this file exists, it will be served instead of Sass, so rename it:
$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scssThen, remove all the *= require_self and *= require_tree . statements from the sass file. Instead, use @import to import Sass files.
Layui JavaScript depends on jQuery.
If you're using Rails 5.1+, add the jquery-rails gem to your Gemfile:
gem 'jquery-rails'$ bundle installRequire Layui Javascripts in app/assets/javascripts/application.js:
//= require jquery
//= require layuiAfter checking out the repo, run bin/setup to install dependencies. 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. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/witcan/layui. This project is intended to be a safe, welcoming space for collaboration.
The gem is available as open source under the terms of the MIT License. 12