Rakefile in hyla-1.0.7.pre.6 vs Rakefile in hyla-1.0.7.pre.7

- old
+ new

@@ -2,14 +2,13 @@ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) require 'rubygems' require 'rake' require 'rake/testtask' -# require 'bundler/version' require 'sass' require 'hyla/configuration' -# require 'font-awesome-sass' +require 'rake/minify' ############################################################################# # # Helper functions # @@ -78,35 +77,44 @@ desc "Run tests" task :default => :test # Generate CSS files -task :compass do +task :compass, [:mode] do |t, args| + mode = args.mode || 'development' + + if mode == "development" + output_style = 'expanded' + else + output_style = 'compact' + end + puts "\n## Compiling Sass" # path = Gem.loaded_specs['font-awesome-sass'].full_gem_path + "/assets/stylesheets" #Go to the compass project directory Dir.chdir File.join(sass_assets, "sass") do |dir| puts "Sass dir : #{dir}" # -s #{style} -I #{path} # To generate the sourcemap --> --sourcemap - system "compass compile --fonts-dir 'fonts' --css-dir 'styles' --sass-dir '.'" + # puts "compass compile --fonts-dir 'fonts' --css-dir 'styles' --sass-dir '.' -e #{mode} --output-style=#{output_style} --force" + system "compass compile --fonts-dir 'fonts' --css-dir 'styles' --sass-dir '.' -e #{mode} --output-style=#{output_style} --force" # Copy css to RevealJS theme # p revealjs_css_assets - sh "cp styles/gpe.css #{revealjs_css_theme_assets}" + sh "cp styles/old-gpe.css #{revealjs_css_theme_assets}" sh "cp styles/font-awesome.css #{revealjs_css_vendor_assets}/font-awesome-4.3.0.css" - sh "cp styles/gpe2.css #{revealjs_redhat_css_theme_assets}/gpe.css" + sh "cp styles/new-gpe.css #{revealjs_redhat_css_theme_assets}/gpe.css" sh "cp styles/theme-v2-liberation.css #{revealjs_redhat_css_theme_assets}/theme-v2-liberation.css" sh "cp styles/theme-v2-overpass.css #{revealjs_redhat_css_theme_assets}/theme-v2-overpass.css" sh "cp styles/theme-output.css #{revealjs_redhat_css_theme_assets}/theme-output.css" sh "cp styles/font-awesome.css #{revealjs_redhat_css_theme_assets}/font-awesome-4.3.0.css" # sh "cp gpe.scss #{revealjs_css_theme_assets}" - # sh "cp styles/gpe.css.map #{revealjs_css_theme_assets}" + # sh "cp styles/old-gpe.css.map #{revealjs_css_theme_assets}" # sh "cp styles/font-awesome.css.map #{revealjs_css_vendor_assets}/font-awesome-4.3.0.css.map" end end @@ -192,9 +200,17 @@ sh "git add ." sh "git commit --allow-empty -m 'Updating to #{sha}.'" sh "git push origin gh-pages" end puts 'Done.' +end + +Rake::Minify.new(:minifyjs) do + dir("lib/resources/assets/revealjs-redhat/lib/js/debug") do + add("lib/resources/assets/revealjs-redhat/lib/js/reveal.min.js", "reveal.js") + add("lib/resources/assets/revealjs-redhat/lib/js/head.min.js", "head.js") + add("lib/resources/assets/revealjs-redhat/lib/js/gpe.min.js", "gpe.js") + end end # desc 'Say Hello' # task :hello, [:msg1, :msg2] do |t, args| # msg1 = args.msg1 or