Last active
September 29, 2015 00:58
-
-
Save bbenezech/1523639 to your computer and use it in GitHub Desktop.
RailsAdmin theme engine template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say "Create theme stub for '#{theme_name = name.sub('rails_admin_', '')}' in gem '#{name}'. This may take a while" | |
run "rm -rf app/ script/ config/ lib/tasks/" | |
run "mkdir -p vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/" | |
inside "vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/" do | |
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/mixins.scss", "mixins.scss" | |
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/variables.scss", "variables.scss" | |
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/theming.scss", "theming.scss" | |
end | |
run "mkdir -p vendor/assets/images/rails_admin/themes/#{theme_name}/" | |
gsub_file "#{name}.gemspec", /app,config,db,lib/, "lib,vendor" | |
say "RailsAdmin theme stub generator is done, you can go hack into '#{name}/vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment