forked from hakjoon/hak_tinymce
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrakefile
More file actions
46 lines (29 loc) · 1.05 KB
/
rakefile
File metadata and controls
46 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require 'fileutils'
require 'rake/clean'
namespace "hak_tinymce" do
CLEAN.include('dev')
COMPRESSOR_FILES = FileList['tinymce_compressor_php/tiny_mce_gzip.*']
DIR = Rake.original_dir
directory "dev"
file "dev/tiny_mce" => "dev" do
puts "Copying TinyMCE into dev/"
FileUtils.cp_r "tinymce-distro/jscripts/tiny_mce", "dev/"
end
COMPRESSOR_FILES.each do |cf|
file cf => 'dev/tiny_mce' do
puts "Copying #{cf} into dev/tiny_mce"
FileUtils.cp cf, "dev/tiny_mce/"
end
end
task :symlink_txpimage => "dev/tiny_mce" do
puts "Symlinking txpimage into plugins folder"
FileUtils.ln_s "#{DIR}/txpimage", "#{DIR}/dev/tiny_mce/plugins/txpimage", :verbose => true
end
task :symlink_plugin => "dev" do
puts "Symlinking plugin file into dev dir"
FileUtils.ln_s "#{DIR}/hak_tinymce.php", "#{DIR}/dev/hak_tinymce.php", :verbose => true
end
task :copy_distro => ["dev/tiny_mce"] | COMPRESSOR_FILES
desc "Setup for development"
task :dev_setup => [:copy_distro, :symlink_txpimage, :symlink_plugin]
end