Sha256: 9c8b9303ef8118af6ecd6ca991b52035675f9e9063896b2141efdd2bc182a744
Contents?: true
Size: 748 Bytes
Versions: 3
Compression:
Stored size: 748 Bytes
Contents
# frozen_string_literal: true require 'autoprefixer-rails' require 'bootstrap' require 'bundler/gem_tasks' require 'fileutils' require 'rspec/core/rake_task' require 'sassc' require 'structured_changelog/tasks' RSpec::Core::RakeTask.new(:spec) task default: :spec desc 'Preprocess assets' task :assets do puts 'Preprocessing SCSS and JS files' puts 'Copying over bootstrap' FileUtils.cp_r Gem::Specification.find_by_name('bootstrap').gem_dir, 'tmp' sass = File.read(File.expand_path('./app/assets/stylesheets/main.scss')) css = SassC::Engine.new(sass, style: :compressed).render prefixed = AutoprefixerRails.process(css) File.open(File.expand_path('./app/assets/stylesheets/main.css'), 'w') { |file| file.write(prefixed) } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
attractor-0.3.3 | Rakefile |
attractor-0.3.2 | Rakefile |
attractor-0.3.1 | Rakefile |