appmake 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/appmake/listeners/css.rb +5 -0
- data/lib/appmake/version.rb +1 -1
- data/lib/appmake.rb +3 -3
- metadata +1 -1
@@ -1,8 +1,11 @@
|
|
1
1
|
require "listen"
|
2
|
+
require "thor"
|
2
3
|
|
3
4
|
module Appmake
|
4
5
|
module Listeners
|
5
6
|
class Css
|
7
|
+
include Thor::Shell
|
8
|
+
|
6
9
|
def self.listen(block = true)
|
7
10
|
callback = Proc.new do |modified, added, removed|
|
8
11
|
self.compile()
|
@@ -15,6 +18,8 @@ module Appmake
|
|
15
18
|
|
16
19
|
def self.compile
|
17
20
|
puts "=> rebuilding CSS"
|
21
|
+
sh = Basic.new
|
22
|
+
sh.say_status :compile, "CSS", :green
|
18
23
|
system("bundle exec sass css/app.scss public/app.css")
|
19
24
|
end
|
20
25
|
end
|
data/lib/appmake/version.rb
CHANGED
data/lib/appmake.rb
CHANGED
@@ -32,15 +32,15 @@ module Appmake
|
|
32
32
|
template "templates/public/index.html.tt", "public/index.html"
|
33
33
|
|
34
34
|
Listeners::Css.compile
|
35
|
-
Listeners::Js.compile
|
36
35
|
Listeners::Tpl.compile
|
36
|
+
Listeners::Js.compile
|
37
37
|
end
|
38
38
|
|
39
39
|
desc "watch", "watch for files to compile"
|
40
40
|
def watch
|
41
41
|
Listeners::Css.listen(false)
|
42
|
-
Listeners::
|
43
|
-
Listeners::
|
42
|
+
Listeners::Tpl.listen(false)
|
43
|
+
Listeners::Js.listen(true)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|