rugular 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/features/abstract.feature +20 -17
- data/features/new.feature +1 -1
- data/lib/rugular/tasks/abstract.rb +21 -11
- data/lib/rugular/templates/new/src/app/app.routes.coffee +0 -2
- data/lib/rugular/templates/route/app.routes.coffee.erb +0 -2
- data/lib/rugular/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d43d1862e8b53e8914e53eb844cd452a1f205bb7
|
4
|
+
data.tar.gz: 6e8b2033c7b078eee9e65e5374eca16658d0e549
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6593f7dc21173535117196316cd9b83437a09a2337043354477673d7854941c3118afc1b56c35047838a97a7315d348bca46a533d525469ab8d22f30541a07ab
|
7
|
+
data.tar.gz: 5e2e500793fc46f6ae108ca46a78c1dd886f5daf51093314df601d62c1a9dee9471e21abc612c5e111e37b51ff1bc0d5be0c0d1079f00b97dc9f293596243be8
|
data/README.md
CHANGED
data/features/abstract.feature
CHANGED
@@ -4,24 +4,26 @@ Feature: Rugular CLI
|
|
4
4
|
As a user of the rugular framework
|
5
5
|
I want to create a bower_component from my rugular application
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
Scenario: Abstracting components folder
|
8
|
+
When I set up Rugular and run "rugular g directive test && rugular abstract -c"
|
9
|
+
Then the file "my-app/bower.json" should contain:
|
10
|
+
"""
|
11
|
+
"version": "0.0.0",
|
12
|
+
"""
|
13
|
+
And a file named "my-app/release/my-app.js" should exist
|
14
|
+
And a file named "my-app/release/my-app.min.js" should exist
|
15
|
+
And a file named "my-app/release/my-app.css" should exist
|
16
|
+
|
17
|
+
Scenario: Abstracting both the app and components folder
|
18
|
+
When I set up Rugular and run "rugular g directive test && rugular abstract"
|
19
|
+
Then the file "my-app/bower.json" should contain:
|
20
|
+
"""
|
21
|
+
"version": "0.0.0",
|
22
|
+
"""
|
23
|
+
And a file named "my-app/release/my-app.js" should exist
|
24
|
+
And a file named "my-app/release/my-app.min.js" should exist
|
25
|
+
And a file named "my-app/release/my-app.css" should exist
|
15
26
|
|
16
|
-
# Scenario: Abstracting both the app and components folder
|
17
|
-
# When I set up Rugular and run "rugular g directive test && rugular abstract"
|
18
|
-
# Then the file "my-app/bower.json" should contain:
|
19
|
-
# """
|
20
|
-
# "version": "0.0.0",
|
21
|
-
# """
|
22
|
-
# And a file named "my-app/release/my-app.js" should exist
|
23
|
-
# And a file named "my-app/release/my-app.css" should exist
|
24
|
-
#
|
25
27
|
Scenario: Abstracting both the app and components folder twice
|
26
28
|
When I set up Rugular and run "rugular g directive test && rugular abstract && rugular abstract"
|
27
29
|
Then the file "my-app/bower.json" should contain:
|
@@ -29,4 +31,5 @@ Feature: Rugular CLI
|
|
29
31
|
"0.0.1"
|
30
32
|
"""
|
31
33
|
And a file named "my-app/release/my-app.js" should exist
|
34
|
+
And a file named "my-app/release/my-app.min.js" should exist
|
32
35
|
And a file named "my-app/release/my-app.css" should exist
|
data/features/new.feature
CHANGED
@@ -42,19 +42,13 @@ module Rugular
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def write_release_js_files
|
46
46
|
File.open(release_js, 'w') do |file|
|
47
|
-
file.write(
|
48
|
-
|
49
|
-
|
50
|
-
javascript_files.map do |javascript_file|
|
51
|
-
CoffeeScript.compile(
|
52
|
-
File.read(javascript_file).gsub('templateUrl', 'template')
|
53
|
-
)
|
54
|
-
end.join
|
47
|
+
file.write(one_coffeescript_file)
|
48
|
+
end
|
55
49
|
|
56
|
-
|
57
|
-
)
|
50
|
+
File.open(release_min_js, 'w') do |file|
|
51
|
+
file.write(Uglifier.compile(one_coffeescript_file))
|
58
52
|
end
|
59
53
|
end
|
60
54
|
|
@@ -69,6 +63,10 @@ module Rugular
|
|
69
63
|
IO.write(release_js, File.open(release_js) do |f|
|
70
64
|
f.read.gsub(html_filename, html)
|
71
65
|
end)
|
66
|
+
|
67
|
+
IO.write(release_min_js, File.open(release_js) do |f|
|
68
|
+
f.read.gsub(html_filename, html)
|
69
|
+
end)
|
72
70
|
end
|
73
71
|
end
|
74
72
|
|
@@ -103,5 +101,17 @@ module Rugular
|
|
103
101
|
def release_js
|
104
102
|
"release/#{app_name}.js"
|
105
103
|
end
|
104
|
+
|
105
|
+
def release_min_js
|
106
|
+
"release/#{app_name}.min.js"
|
107
|
+
end
|
108
|
+
|
109
|
+
def one_coffeescript_file
|
110
|
+
@_one_coffeescript_file ||= javascript_files.map do |javascript_file|
|
111
|
+
CoffeeScript.compile(
|
112
|
+
File.read(javascript_file).gsub('templateUrl', 'template')
|
113
|
+
)
|
114
|
+
end.join
|
115
|
+
end
|
106
116
|
end
|
107
117
|
end
|
data/lib/rugular/version.rb
CHANGED