Sha256: 78ccfbc78b1f9824d0b8ee4eacc5e83c410d5f4bb458a1e7b1bf2a87c2e48c1f

Contents?: true

Size: 686 Bytes

Versions: 25

Compression:

Stored size: 686 Bytes

Contents

namespace :assets do
	if defined? CoffeeScript
		desc "compile coffeescript"
		task :compile do
			FileList['js/**/*.coffee'].each do |coffee|
				File.open(coffee.sub(/\.coffee\z/, '.js'), 'w') do |js|
					js.write CoffeeScript.compile(File.read(coffee))
				end
			end
		end
	end

	desc "copy assets files"
	task :copy do
		require 'fileutils'
		assets_path = File.dirname(__FILE__) + '/../../public/assets'

		FileUtils.mkdir_p assets_path
		FileList['{js,theme}/*'].each do |file|
			FileUtils.cp_r(file, "#{assets_path}/#{Pathname.new(file).basename}")
		end
	end
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
tdiary-4.1.1 lib/tdiary/tasks/assets.rake
tdiary-4.1.0 lib/tdiary/tasks/assets.rake
tdiary-4.1.0.20141126 lib/tdiary/tasks/assets.rake
tdiary-4.0.5.1 tdiary/tasks/assets.rake
tdiary-4.0.5 tdiary/tasks/assets.rake
tdiary-4.0.4 tdiary/tasks/assets.rake
tdiary-4.0.3 tdiary/tasks/assets.rake
tdiary-4.0.2.20140201 tdiary/tasks/assets.rake
tdiary-4.0.2 tdiary/tasks/assets.rake
tdiary-4.0.1.20131102 tdiary/tasks/assets.rake
tdiary-4.0.1.20130929 tdiary/tasks/assets.rake
tdiary-4.0.1.20130903 tdiary/tasks/assets.rake
tdiary-4.0.1 tdiary/tasks/assets.rake
tdiary-4.0.0.20130826 tdiary/tasks/assets.rake
tdiary-4.0.0 tdiary/tasks/assets.rake
tdiary-3.2.2.20130727 tdiary/tasks/assets.rake
tdiary-3.2.2.20130722 tdiary/tasks/assets.rake
tdiary-3.2.2.20130720 tdiary/tasks/assets.rake
tdiary-3.2.2.20130617 tdiary/tasks/assets.rake
tdiary-3.2.2.20130614 tdiary/tasks/assets.rake