wp-fire 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,12 +12,19 @@ module WpFire
12
12
  File.open File.join(build_path, basename), "w" do |f|
13
13
  f.puts sass_engine.to_css
14
14
  end
15
+ elsif extname.eql?".css"
16
+ FileUtils.cp filename, File.join(build_path, File.basename(filename))
15
17
  elsif extname.eql?".coffee"
16
18
  File.open File.join(build_path, basename), "w" do |f|
17
19
  f.puts CoffeeScript.compile File.read(filename)
18
20
  end
21
+ elsif extname.eql?".js"
22
+ FileUtils.cp filename, File.join(build_path, File.basename(filename))
19
23
  elsif extname.eql?".php"
20
24
  FileUtils.cp filename, File.join(build_path, File.basename(filename))
25
+ elsif [".jpg",".jpeg",".png",".gif",".ico"].include?(extname)
26
+ Dir.mkdir File.join(build_path, "images") unless File.directory?(File.join(build_path, "images"))
27
+ FileUtils.cp filename, File.join(build_path, "images", File.basename(filename))
21
28
  end
22
29
  end
23
30
 
@@ -26,9 +26,6 @@ module WpFire
26
26
  @build_path = File.join(dir,"build")
27
27
  FileUtils.rm_rf(@build_path) if File.directory?(@build_path)
28
28
  Dir.mkdir @build_path
29
- Dir[File.join(dir.split(/\\/), "*.*")].each do |f|
30
- File.unlink f unless File.basename(f).eql? "config.rb"
31
- end
32
29
  watch_directories = [@assets_path,@templates_path,@functions_path]
33
30
  WpFire::Compiler.compile_all watch_directories, @build_path
34
31
  end
@@ -51,8 +48,12 @@ module WpFire
51
48
  @build_path = dir
52
49
  end
53
50
 
54
- Dir[File.join(dir.split(/\\/), "*.*")].each do |f|
55
- File.unlink f unless File.basename(f).eql? "config.rb"
51
+ Dir[File.join(dir,"*")].each do |f|
52
+ unless File.directory?(f)
53
+ File.unlink f unless File.basename(f).eql? "config.rb"
54
+ else
55
+ FileUtils.rm_rf(f) unless File.basename(f).eql? "source"
56
+ end
56
57
  end
57
58
  watch_directories = [@assets_path,@templates_path,@functions_path]
58
59
  WpFire::Compiler.compile_all watch_directories, @build_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wp-fire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: