qedproject 0.0.8 → 0.0.9

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.
@@ -20,6 +20,11 @@ module QEDProject
20
20
  puts "Created folder #{destination}" if verbose
21
21
  end
22
22
 
23
+ def create_file(destination, options = {})
24
+ FileUtils.touch destination
25
+ puts "Created file #{destination}" if verbose
26
+ end
27
+
23
28
 
24
29
  # Reads a template from the file system,
25
30
  # evaluates it with ERB
@@ -2,7 +2,7 @@ module QEDProject
2
2
  module Libraries
3
3
  class JQuery < QEDProject::Libraries::Base
4
4
  library :jquery
5
- set_js_files ["jquery-1.6.2.min.js"]
5
+ set_js_files ["jquery-1.6.4.js"]
6
6
  end
7
7
  end
8
8
  end
@@ -153,8 +153,18 @@ module QEDProject
153
153
  mkdir_p( File.join(self.path, self.js_path), :verbose => self.verbose)
154
154
  mkdir_p( File.join(self.path, self.css_path), :verbose => self.verbose)
155
155
  mkdir_p( File.join(self.path, "config"), :verbose => self.verbose) if self.needs_config_folder?
156
- mkdir_p( File.join(self.path, "coffeescripts"), :verbose => self.verbose) if self.coffeescript
157
- mkdir_p( File.join(self.path, "sass"), :verbose => self.verbose) if self.sass
156
+ if self.coffeescript
157
+ mkdir_p( File.join(self.path, "coffeescripts"), :verbose => self.verbose)
158
+ create_file(File.join(self.path, "coffeescripts", "app.coffee"), :verbose => self.verbose)
159
+ else
160
+ create_file(File.join(self.path, self.js_path, "app.js" ), :verbose => self.verbose)
161
+ end
162
+ if self.sass
163
+ mkdir_p( File.join(self.path, "sass"), :verbose => self.verbose)
164
+ create_file( File.join(self.path, "sass", "app.sass"), :verbose => self.verbose)
165
+ else
166
+ create_file(File.join(self.path, self.css_path, "app.css" ), :verbose => self.verbose)
167
+ end
158
168
  end
159
169
 
160
170
  # Loop through the libraries the user added
@@ -1,3 +1,3 @@
1
1
  module QEDProject
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/templates/assets.yml CHANGED
@@ -3,9 +3,19 @@ stylesheets:
3
3
  <% self.css_assets.each do |lib| -%>
4
4
  - <%=File.join(self.css_path, lib) %>
5
5
  <% end -%>
6
+ <% if self.sass -%>
7
+ - <%= File.join("tmp", "app.css") %>
8
+ <% else -%>
9
+ - <%= File.join(self.css_path, "app.css") %>
10
+ <% end -%>
6
11
 
7
12
  javascripts:
8
13
  app:
9
14
  <% self.js_assets.each do |lib| -%>
10
15
  - <%=File.join(self.js_path, lib) %>
11
- <% end -%>
16
+ <% end -%>
17
+ <% if self.coffeescript -%>
18
+ - <%= File.join("tmp", "app.js") %>
19
+ <% else -%>
20
+ - <%= File.join(self.js_path, "app.js") %>
21
+ <% end -%>
data/templates/index.html CHANGED
@@ -1,13 +1,34 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>Project</title>
6
+ <meta name="description" content="">
7
+ <meta name="author" content="">
8
+ <!--[if lt IE 9]>
9
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
10
+ <![endif]-->
5
11
  <% if @project.jammit -%>
6
12
  <link rel="stylesheet" href="assets/app.css">
7
13
  <% else -%>
8
- <link rel="stylesheet" href="stylesheets/style.css">
14
+ <% @project.css_assets.each do |css| -%>
15
+ <link rel="stylesheet" href="stylesheets/<%=css %>">
9
16
  <% end -%>
10
-
17
+ <link rel="stylesheet" href="stylesheets/app.css">
18
+ <% end -%>
19
+ <script type="text/javascript">
20
+
21
+ var _gaq = _gaq || [];
22
+ _gaq.push(['_setAccount', 'UA-XXXXX-X']);
23
+ _gaq.push(['_trackPageview']);
24
+
25
+ (function() {
26
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
27
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
28
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
29
+ })();
30
+
31
+ </script>
11
32
  </head>
12
33
  <body>
13
34
 
@@ -29,6 +50,7 @@
29
50
  <% @project.js_assets.each do |js| -%>
30
51
  <script src="javascripts/<%=js %>"></script>
31
52
  <% end -%>
53
+ <script src="javascripts/app.js"></script>
32
54
  <% end -%>
33
55
  </body>
34
56
  </html>