repres-react 1.0 → 1.0.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: bed667d9ac283614e0503c0539a49fa613be9da7
4
- data.tar.gz: 3a55181dc7d9db5ef8ff08f4b0beb13b902afeaa
3
+ metadata.gz: c5eef17a5767b97cdc9d7cfa39ce061dafd8b1ed
4
+ data.tar.gz: eb5cf0f8213f2631e0320f6796c72da9a3f94e63
5
5
  SHA512:
6
- metadata.gz: de9ca95c7973b014078c33c4dcc58f12517a1a773c6d5de9781cf7063884a1870ee22f19120a6b68d24e99b03281a05af1be1b43aa09a4744a57aa35784187f8
7
- data.tar.gz: e1bfc2967b3a491595f9d27fffcca8cf3accac0929c139eedf40d7bb47c28e7aef967ce94d398c5c1535bfea9cf28ae944e2f86b98aeb84fc028f90aa0011982
6
+ metadata.gz: d115e52f14dba2f5ffcbfd0cb41ba3a30f07912cd25f0cd99647e1ef533c7915693f6f8a62d4adf8181bd6868b373b50a391606804eb90326591327f1804c593
7
+ data.tar.gz: 45322fd6341e74e79ca938c17ebc7d7f9e84d97433c980172598b2de2a209ce77234c5a91d1d03f00b4a2e7f92a1d380b77dba83af145117b9dd04849342b431
data/README.md CHANGED
@@ -1,2 +1,46 @@
1
- # repres-react
1
+ # Repres React React资源表现引擎
2
+
3
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
4
+ [![Gem Version](https://badge.fury.io/rb/repres-react.svg)](https://badge.fury.io/rb/repres-react)
5
+
2
6
  Repres (REsource PRESentation) is a series of resource presentation engines. The React resource presentation engine includes React-based resource presentation templates & snippets. Repres (资源表现)是一系列的资源表现引擎。React 资源表现引擎包括基于React的资源表现模版和片段。
7
+
8
+
9
+
10
+ ## Recent Update
11
+ Check out the [Road Map](ROADMAP.md) to find out what's the next.
12
+ Check out the [Change Log](CHANGELOG.md) to find out what's new.
13
+
14
+
15
+
16
+ ## Usage in Gemfile
17
+ ```ruby
18
+ gem 'repres-react'
19
+ ```
20
+
21
+
22
+
23
+ ## Render the Pre-defined Partials
24
+
25
+ ### Render the Script
26
+ The Script partial includes the HTML script tags for React and its extensions. Only the [Boot CDN](http://cdn.bootcss.com/) servers are supported.
27
+
28
+ The following code snippet does __not__ load any JavaScript library.
29
+ ```erb
30
+ <%= render partial: 'repres/react/script' %>
31
+ ```
32
+
33
+ The following code snippet loads the latest React JavaScript library.
34
+ ```erb
35
+ <%= render partial: 'repres/bootstrap/script', locals: { options: { react: true, 'react-dom': true } } %>
36
+ ```
37
+
38
+ The following code snippet loads the React JavaScript library with the given version.
39
+ ```erb
40
+ <%= render partial: 'repres/bootstrap/script', locals: { options: { react: { version: '15.0.2' }, 'react-dom': { version: '15.0.2' } } }
41
+ %>
42
+ ```
43
+
44
+ The following JavaScript libraries are switchable, and the version can be configurable:
45
+ - :react
46
+ - :'react-dom'
@@ -10,4 +10,4 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require_tree .
13
+ //= require_self
@@ -10,6 +10,5 @@
10
10
  * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
11
  * file per style scope.
12
12
  *
13
- *= require_tree .
14
13
  *= require_self
15
14
  */
@@ -3,12 +3,13 @@
3
3
  <head>
4
4
  <title>Repres React</title>
5
5
  <%= stylesheet_link_tag "repres/react/application", media: "all" %>
6
- <%= javascript_include_tag "repres/react/application" %>
7
6
  <%= csrf_meta_tags %>
8
7
  </head>
9
8
  <body>
10
9
 
11
10
  <%= yield %>
12
11
 
12
+ <%= javascript_include_tag 'repres/react/application' %>
13
+
13
14
  </body>
14
15
  </html>
@@ -1,4 +1,4 @@
1
1
  <% options = defined?(options) ? options : nil %>
2
2
 
3
- <%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:react, '15.0.2', options)}/react.min.js" if library_enabled?(:react, options) %>
4
- <%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:'react-dom', '15.0.2', options)}/react-dom.min.js" if library_enabled?(:'react-dom', options) %>
3
+ <%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:react, '15.1.0', options)}/react.min.js" if library_enabled?(:react, options) %>
4
+ <%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:'react-dom', '15.1.0', options)}/react-dom.min.js" if library_enabled?(:'react-dom', options) %>
@@ -1,5 +1,5 @@
1
1
  module Repres
2
2
  module React
3
- VERSION = '1.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repres-react
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-14 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.4.5.1
84
+ rubygems_version: 2.6.4
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Repres React Resource Presentation Engine React资源表现引擎