Sha256: 5599f166d9602acb5a1395ea936c50274ddff6c4e449cf9ef1c0c3afefe38ffb
Contents?: true
Size: 793 Bytes
Versions: 5
Compression:
Stored size: 793 Bytes
Contents
# encoding: utf-8 require 'coffee_script' require 'easy_html_generator/generator/base' # this generator coffee sass files from src folder and copies them # to the dist folder class EasyHtmlGenerator::Generator::Compile::Coffee < EasyHtmlGenerator::Generator::Base def initialize(project, config) super(project, config) @config.src = project.config.paths.src.scripts @config.dest = project.config.paths.dist.scripts end def do_input(input, src = 'inline') result = CoffeeScript.compile input return result unless @config.minimize EasyHtmlGenerator::Generator::Minimize::Js.compress result rescue StandardError => e raise e, "#{e.message} in #{src} ", e.backtrace end def input_to_output_file(i) super(i).gsub('.js.coffee', '.js') end end
Version data entries
5 entries across 5 versions & 1 rubygems