vvtool 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65ae28bec15aa73b776b27b0b1e3185723d4c6d8
4
- data.tar.gz: fec96004160fc294e0f3007e74108cd64c7b46ea
3
+ metadata.gz: 9a1878568dc9770fe3a8df031b8ba874bf0faccd
4
+ data.tar.gz: 867eac831e1d8f2af192a3d45a91fb7ce2e12928
5
5
  SHA512:
6
- metadata.gz: 40f870803a492476af4ed4145ee29037fc1ad38d51bab575c6b6c9c2538afa7da8148b7b806f97ee61bd18054db56787faf36248d9bfa311e4138a121d00089c
7
- data.tar.gz: 6e30afe676740938eb1b99623caf2d10e728096707c50b639918cdffe1f4371ef57c0b31c425f51d892f13afcb9527dba35acd556460998f90d29b0ac75f67f6
6
+ metadata.gz: 554a45940ca474c9f38c7f029e4c91684f4f975f47aab936c6a097d04f0a98190a87da592db90574c9da0f805c91a955802965b13f5a391f33a85c209cfe3378
7
+ data.tar.gz: 9da3f6117ae31ceea2becb76f4645f499f3454fa5d6c3359640ce87c4ef3adfa5cc7458e2888a72d3c227e3ea92255adac58b179f8cbad8279becb3a1817953a
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 ChenTian
3
+ Copyright (c) 2018 isaced
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,39 +1,58 @@
1
- # Vvtool
1
+ # VVTool
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/vvtool`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ 这是一个加速开发 Virtual View 模版的小脚本,让你能脱离繁重的开发环境 Xcode Android Studio,只需一个轻量级的文本编辑器如 VSCode/Atom/SublimeText 即可开始进入开发,并且提供热加载能力,大大加速提高开发调试效率。
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ![screen_record.gif](https://raw.githubusercontent.com/alibaba/virtualview_tools/master/compiler-tools/RealtimePreview/screenshot.gif)
6
6
 
7
- ## Installation
7
+ ## 安装
8
8
 
9
- Add this line to your application's Gemfile:
9
+ 本工具由 Ruby 所写,你可以通过 Ruby 的包管理工具 `gem` 来安装:
10
10
 
11
11
  ```ruby
12
- gem 'vvtool'
12
+ gem install vvtool
13
13
  ```
14
14
 
15
- And then execute:
15
+ > 因为 VV 模版的编译器需要 Java 环境,所以另外需要 java 环境支持。
16
16
 
17
- $ bundle
17
+ ## 运行
18
18
 
19
- Or install it yourself as:
19
+ 切换到你的模版列表目录,然后执行如下命令即可:
20
20
 
21
- $ gem install vvtool
21
+ ```ruby
22
+ vvtool run
23
+ ```
24
+
25
+ ## Playground
22
26
 
23
- ## Usage
27
+ 若需要脱离 iOS/Android 开发环境开发 VV,则需要安装对应客户端到真机或模拟器进行预览、调试、开发。
24
28
 
25
- TODO: Write usage instructions here
29
+ - [iOS Playground](https://github.com/alibaba/VirtualView-iOS)
30
+ - [Android Playground](https://github.com/alibaba/Virtualview-Android)
26
31
 
27
- ## Development
32
+ > 模拟器:通过 127.0.0.1 访问本机 vvtool 服务
33
+ >
34
+ > 真机:通过扫描模版对应二维码来访问
35
+ >
36
+ > 需要运行 VVTool 的机器和对应 Playground 设备都在同一网段;
28
37
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
38
+ ## 模版目录结构
30
39
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
40
+ ```
41
+ .
42
+ └── helloworld
43
+ ├── helloworld.json (该模版所需参数)
44
+ ├── helloworld.out (该模版编译后的二进制)
45
+ ├── helloworld.xml (该模版源文件)
46
+ └── helloworld_QR.png (该模版 URL 供于扫码加载)
47
+ └── helloworld1
48
+ ...
49
+ ```
32
50
 
33
- ## Contributing
51
+ 你自己需要维持这样一份模版目录结构,才能让服务正确对接到客户端 Playground,其中有几点需要注意:
34
52
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/vvtool.
53
+ 1. 每个模版必须按独立文件夹区分(可以含有子模版)
54
+ 2. 模版中的 xml/json 文件名必须和目录名一致 (子模版除外)
36
55
 
37
- ## License
56
+ ## 二维码扫描
38
57
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
58
+ 每个模版目录下会生成类似 `xx_QR.png` 的二维码图片,指向当前模版对应的本地HTTP 地址,如 *http://127.0.0.1:7788/helloworld/data.json* ,对应 iOS/Android Playground 应用可通过二维码扫描读取该路径中的模版和数据,然后在客户端加载。
data/lib/live_server.rb CHANGED
@@ -70,7 +70,7 @@ module VVPrepare
70
70
  templateName = File.basename aTemplatePath, '.*'
71
71
 
72
72
  next if not File.directory? aTemplatePath
73
- next if not File.exist?(File.join(aTemplatePath, "#{templateName}.json"))
73
+ next if not File.exist?(File.join(aTemplatePath, "#{templateName}.xml"))
74
74
  next if templateName.start_with? '.'
75
75
 
76
76
  # 把所有模版名记录下来
@@ -1,3 +1,3 @@
1
1
  module VVTool
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/vvtool.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  lib = File.expand_path("../lib", __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require "vvtool/version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vvtool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - isaced