Sha256: 2dc45dbbcffd8f8477ac5a2be426fe7cf9b81e2767fd2ebb59c77f34c5feb02f

Contents?: true

Size: 674 Bytes

Versions: 7

Compression:

Stored size: 674 Bytes

Contents

namespace :assets do
  desc "Build all static assets"
  task build: [:"assets:build:stylesheets"]

  namespace :build do
    def path(*segments)
      File.join(*segments)
    end

    CSS_FILES = %w(neopoly_style neopoly_style_responsive)

    desc "Convert SASS stylesheets to CSS"
    task :stylesheets do
      require "sass"

      CSS_FILES.each do |name|
        input  = path("lib", "assets", "stylesheets", "#{name}.sass")
        output = path("assets", "stylesheets", "#{name}.css")
        engine = Sass::Engine.for_file(input, syntax: :sass, style: :compact)
        File.write(output, engine.render)
        puts "Build: #{output}"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
redmine-neopoly_style-0.3.6 rakelib/assets.rake
redmine-neopoly_style-0.3.5 rakelib/assets.rake
redmine-neopoly_style-0.3.4 rakelib/assets.rake
redmine-neopoly_style-0.3.3 rakelib/assets.rake
redmine-neopoly_style-0.3.2 rakelib/assets.rake
redmine-neopoly_style-0.3.1 rakelib/assets.rake
redmine-neopoly_style-0.3.0 rakelib/assets.rake