atome 0.1.00005 → 0.1.00006
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/app_builder_helpers/Rakefile +22 -20
- data/exe/atome +21 -2
- data/lib/atome/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52c49373089fad75541d709e0a1e4f6308814d233ae065c3878e2c9b70519f41
|
|
4
|
+
data.tar.gz: 19a30b6146ffcf2e7fdb5e947f2d040a113e6df4462d78009f4b344d153f24a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d69ff12e61d2f9645b63a1fdcb7bee47c855d5f675b33a0f8fb5dfb82eb265162c9bf2bcbc362d5199a3af5a369a2e0443777f1f8137376d526b614b94142643
|
|
7
|
+
data.tar.gz: 453a3338ea67304157a79c8d07e976ac8345f540b6cca9469d68dfdb1868d49b01a33ee1fabd55c245e54d6d746e14c242d423e45ee405f9d5808ff4978d50f1
|
|
@@ -8,52 +8,54 @@ require 'uglifier'
|
|
|
8
8
|
|
|
9
9
|
Opal.append_path 'app'
|
|
10
10
|
|
|
11
|
-
def build_opal_browser(user_project_path)
|
|
11
|
+
def build_opal_browser(user_project_path, production = false)
|
|
12
12
|
browser_js = "#{user_project_path}/build/js/opal/opal_browser.js"
|
|
13
|
-
browser_content= Opal::Builder.build('../lib/atome/renderers/opal/opal_browser.rb').to_s
|
|
14
|
-
browser_content.gsub!("$$$('STDERR')['$write_proc='](typeof(process) === 'object' && typeof(process.stderr) === 'object' ? function(s){process.stderr.write(s)} : function(s){console.warn(s)});","$$$('STDERR')['$write_proc='](typeof(process) === 'object' && typeof(process.stderr) === 'object' ? function(s){process.stderr.write(s)} : function(s){});")
|
|
15
|
-
|
|
13
|
+
browser_content = Opal::Builder.build('../lib/atome/renderers/opal/opal_browser.rb').to_s
|
|
14
|
+
browser_content.gsub!("$$$('STDERR')['$write_proc='](typeof(process) === 'object' && typeof(process.stderr) === 'object' ? function(s){process.stderr.write(s)} : function(s){console.warn(s)});", "$$$('STDERR')['$write_proc='](typeof(process) === 'object' && typeof(process.stderr) === 'object' ? function(s){process.stderr.write(s)} : function(s){});")
|
|
15
|
+
browser_content = Uglifier.new.compile(browser_content) if production
|
|
16
16
|
File.open(browser_js, 'w') do |f|
|
|
17
|
-
f.puts
|
|
17
|
+
f.puts browser_content
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def build_atome_kernel(user_project_path, gem_location)
|
|
21
|
+
def build_atome_kernel(user_project_path, gem_location, production = false)
|
|
22
22
|
kernel_js = "#{user_project_path}/build/js/atome/kernel.js"
|
|
23
23
|
builder = Opal::Builder.new
|
|
24
24
|
builder.append_paths("#{gem_location}/../lib/")
|
|
25
|
-
kernel_content=builder.build("#{gem_location}/../lib/atome.rb").to_s
|
|
26
|
-
|
|
25
|
+
kernel_content = builder.build("#{gem_location}/../lib/atome.rb").to_s
|
|
26
|
+
kernel_content = Uglifier.new.compile(kernel_content) if production
|
|
27
27
|
File.open(kernel_js, 'w') do |f|
|
|
28
|
-
f.puts
|
|
28
|
+
f.puts kernel_content
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def build_opal_parser(user_project_path)
|
|
32
|
+
def build_opal_parser(user_project_path, production = false)
|
|
33
33
|
parser_js = "#{user_project_path}/build/js/opal/opal_parser.js"
|
|
34
34
|
parser_content = Opal::Builder.build('../lib/atome/renderers/opal/opal_parser.rb').to_s
|
|
35
|
-
|
|
35
|
+
parser_content = Uglifier.new.compile(parser_content) if production
|
|
36
36
|
File.open(parser_js, 'w') do |f|
|
|
37
|
-
f.puts
|
|
37
|
+
f.puts parser_content
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
def build_user_code(user_project_path)
|
|
41
|
+
def build_user_code(user_project_path, production = false)
|
|
42
42
|
application_js = "#{user_project_path}/build/js/application.js"
|
|
43
|
-
application_content= Opal::Builder.build('../vendor/assets/index.rb').to_s
|
|
44
|
-
|
|
43
|
+
application_content = Opal::Builder.build('../vendor/assets/index.rb').to_s
|
|
44
|
+
application_content = Uglifier.new.compile(application_content) if production
|
|
45
45
|
File.open(application_js, 'w') do |f|
|
|
46
|
-
f.puts
|
|
46
|
+
f.puts application_content
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
task :system_builder do
|
|
51
|
+
# change to false for not production mode and faster compile time
|
|
52
|
+
production = false
|
|
51
53
|
user_project_path = ARGV[1]
|
|
52
54
|
gem_location = File.join(File.dirname(__FILE__))
|
|
53
|
-
build_atome_kernel(user_project_path, gem_location)
|
|
54
|
-
build_opal_browser(user_project_path)
|
|
55
|
-
build_opal_parser(user_project_path)
|
|
56
|
-
build_user_code(user_project_path)
|
|
55
|
+
build_atome_kernel(user_project_path, gem_location, production)
|
|
56
|
+
build_opal_browser(user_project_path, production)
|
|
57
|
+
build_opal_parser(user_project_path, production)
|
|
58
|
+
build_user_code(user_project_path, production)
|
|
57
59
|
end
|
|
58
60
|
|
|
59
61
|
task :build do
|
data/exe/atome
CHANGED
|
@@ -7,12 +7,30 @@ def run option = :browser, location = nil
|
|
|
7
7
|
case option
|
|
8
8
|
when :server
|
|
9
9
|
require 'atome'
|
|
10
|
-
puts "######"
|
|
11
10
|
if location
|
|
12
11
|
`cd ./#{location}/server;rackup --server puma --port 9292 --env production`
|
|
13
12
|
else
|
|
14
13
|
`cd ./server;rackup --server puma --port 9292 --env production`
|
|
15
14
|
end
|
|
15
|
+
when :browser
|
|
16
|
+
if location
|
|
17
|
+
`cd ./#{location}/build;open index.html`
|
|
18
|
+
else
|
|
19
|
+
`cd ./build;open index.html`
|
|
20
|
+
end
|
|
21
|
+
when :osx
|
|
22
|
+
puts `pwd`
|
|
23
|
+
require 'webview_ruby'
|
|
24
|
+
webview = WebviewRuby::Webview.new
|
|
25
|
+
webview.set_title("atome")
|
|
26
|
+
webview.set_size(480, 360)
|
|
27
|
+
if location
|
|
28
|
+
webview.navigate("file:/#{`pwd`}/#{location}/build/index.html")
|
|
29
|
+
else
|
|
30
|
+
webview.navigate("file:#{`pwd`.chomp}/build/index.html")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
webview.run
|
|
16
34
|
else
|
|
17
35
|
# nothing for now
|
|
18
36
|
end
|
|
@@ -35,15 +53,16 @@ when 'create'
|
|
|
35
53
|
end
|
|
36
54
|
# now run the rake task to build the needed libraries (atome, renderers, etc...)
|
|
37
55
|
`cd #{app_builder_helpers};rake system_builder #{current_path}/#{project_name}`
|
|
38
|
-
run(:server, project_name)
|
|
39
56
|
when 'run'
|
|
40
57
|
case ARGV[1]
|
|
41
58
|
when 'android'
|
|
42
59
|
when 'browser'
|
|
60
|
+
run(:browser)
|
|
43
61
|
when 'freebsd'
|
|
44
62
|
when 'ios'
|
|
45
63
|
when 'linux'
|
|
46
64
|
when 'osx'
|
|
65
|
+
run(:osx)
|
|
47
66
|
when 'server'
|
|
48
67
|
run(:server)
|
|
49
68
|
when 'windows'
|
data/lib/atome/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atome
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.00006
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean-Eric Godard
|
|
@@ -276,6 +276,20 @@ dependencies:
|
|
|
276
276
|
- - "~>"
|
|
277
277
|
- !ruby/object:Gem::Version
|
|
278
278
|
version: '0.1'
|
|
279
|
+
- !ruby/object:Gem::Dependency
|
|
280
|
+
name: webview_ruby
|
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
|
282
|
+
requirements:
|
|
283
|
+
- - "~>"
|
|
284
|
+
- !ruby/object:Gem::Version
|
|
285
|
+
version: '0.1'
|
|
286
|
+
type: :runtime
|
|
287
|
+
prerelease: false
|
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
289
|
+
requirements:
|
|
290
|
+
- - "~>"
|
|
291
|
+
- !ruby/object:Gem::Version
|
|
292
|
+
version: '0.1'
|
|
279
293
|
description: the creative framework.
|
|
280
294
|
email:
|
|
281
295
|
- jeezs@jeezs.net
|
|
@@ -337,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
337
351
|
- !ruby/object:Gem::Version
|
|
338
352
|
version: '0'
|
|
339
353
|
requirements: []
|
|
340
|
-
rubygems_version: 3.3.
|
|
354
|
+
rubygems_version: 3.3.11
|
|
341
355
|
signing_key:
|
|
342
356
|
specification_version: 4
|
|
343
357
|
summary: the creative framework
|