appril 0.2.3 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46a3ca3d7a142bc013745973c9b9ff457f571027
4
- data.tar.gz: 165163f835c82f72acf2d116cc91cf9c2fd0ab0a
3
+ metadata.gz: 72dd0f91695b8e546793a5c03018f011ba9e446f
4
+ data.tar.gz: df4959b87b87911ecc62450917fe419d55b343b9
5
5
  SHA512:
6
- metadata.gz: f8a73b57d4631398550006a6c8873bfff31a866ad842292bf5842aabd68ae374617295ecc35da0bae05cf05e08bd0292efb0180e0a9621642a99dc563455acef
7
- data.tar.gz: ea0b7461bc0420e1f8c173b14e497d8421b92e3de69d6b8a2447bd2c35d334457c5823273dc2f5cf819572e8eb0dbc571caabf238ad812e2880a9912cf662727
6
+ metadata.gz: 22bd51699a3a794db52b85b3f87ecee1c544e2dd847e6e1c1316754baa818a95fbbde123c92e6b7b48e02af3859549669a5ac3df81822197212800f376310eb8
7
+ data.tar.gz: f11894dff07b160db70b894b5ee5f8da112c6f239dd66e9a9f82d989b631608760a6d2362d37666d697f13ba717080cd9febf8511b6d0977a0be49ddbec28cc5
@@ -18,9 +18,8 @@ module Appril
18
18
 
19
19
  def generate_config_file dir
20
20
  config = Appril.load_configs("#{dir}/config", env: :development)
21
- File.open File.expand_path('config.js', dir), 'w' do |f|
22
- f << "// auto-generated file, do not edit\n"
23
- f << "module.exports = " << JSON.pretty_generate({
21
+ File.open File.expand_path('config.json', dir), 'w' do |f|
22
+ f << JSON.pretty_generate({
24
23
  build_path: config[:build_path],
25
24
  client_url: config[:client_url],
26
25
  server_url: config[:server_url],
@@ -31,9 +30,9 @@ module Appril
31
30
  end
32
31
 
33
32
  def generate_store_modules_file dir
33
+
34
34
  lines = controllers_map(dir).each_with_object([
35
35
  '// auto-generated file, do not edit',
36
- 'const modules = {}'
37
36
  ]) do |c,o|
38
37
  next unless c[:name] # skip anonymous controllers
39
38
  pattern = "base/components/#{c[:path]}/store.*"
@@ -41,11 +40,11 @@ module Appril
41
40
  path = file.sub(dir, 'app')
42
41
  o << "
43
42
  import #{c[:name]} from '#{path}'
44
- modules.#{c[:name]} = #{c[:name]}
43
+ export {#{c[:name]}}
45
44
  "
46
45
  end
47
- lines.push('export default modules')
48
- file = File.expand_path('store_modules.js', dir)
46
+
47
+ file = File.expand_path('base/store/modules.js', dir)
49
48
  FileUtils.mkdir_p(File.dirname(file))
50
49
  File.open(file, 'w') {|f| f << lines.join("\n")}
51
50
  end
@@ -1,3 +1,3 @@
1
1
  module Appril
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appril
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slee Woo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-06 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rocketio
@@ -78,5 +78,5 @@ rubyforge_project:
78
78
  rubygems_version: 2.5.1
79
79
  signing_key:
80
80
  specification_version: 4
81
- summary: '["appril-0.2.3", "Opinionated framework for building opinionated web applications"]'
81
+ summary: '["appril-0.2.5", "Opinionated framework for building opinionated web applications"]'
82
82
  test_files: []