appmake 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/appmake.rb +11 -6
  2. metadata +1 -1
data/lib/appmake.rb CHANGED
@@ -26,6 +26,11 @@ class Appmake
26
26
  FileUtils.mkdir "js"
27
27
  end
28
28
 
29
+ unless Dir.exists? "js/lib"
30
+ puts "=> mkdir /js/lib"
31
+ FileUtils.mkdir "js/lib"
32
+ end
33
+
29
34
  puts "=> touch /js/app.tjs"
30
35
  FileUtils.touch "js/app.tjs"
31
36
 
@@ -34,8 +39,8 @@ class Appmake
34
39
  f.puts(COMPILE_TEMPLATES_JS)
35
40
  f.close
36
41
 
37
- puts "=> create /js/doT.js"
38
- f = File.new("js/doT.js", "w+")
42
+ puts "=> create /js/lib/doT.js"
43
+ f = File.new("js/lib/doT.js", "w+")
39
44
  f.puts(DOTJS_JS)
40
45
  f.close
41
46
 
@@ -89,7 +94,7 @@ class Appmake
89
94
  end
90
95
  end
91
96
 
92
- COMPILE_TEMPLATES_JS = <<EOS
97
+ COMPILE_TEMPLATES_JS = <<'EOS'
93
98
  var app_dir = __dirname + '/../',
94
99
  tpl_dir = app_dir + 'tpl/',
95
100
  js_dir = app_dir + 'js/',
@@ -152,11 +157,11 @@ function buildModule() {
152
157
  for (n in templates)
153
158
  content.push('"' + n + '": ' + templates[n]);
154
159
 
155
- return ['module.exports = {', content.join(','), '};'].join('').replace(/(\\n|\\r|\\r\\n)/, '');
160
+ return ['module.exports = {', content.join(','), '};'].join('').replace(/(\n|\r|\r\n)/, '');
156
161
  }
157
162
  EOS
158
163
 
159
- DOTJS_JS = <<EOS
164
+ DOTJS_JS = <<'EOS'
160
165
  // doT.js
161
166
  // 2011, Laura Doktorova, https://github.com/olado/doT
162
167
  // Licensed under the MIT license.
@@ -294,7 +299,7 @@ DOTJS_JS = <<EOS
294
299
  }());
295
300
  EOS
296
301
 
297
- INDEX_HTML = <<EOS
302
+ INDEX_HTML = <<'EOS'
298
303
  <!doctype>
299
304
  <html>
300
305
  <head>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: