creact 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/bin/creact +5 -0
- data/creact.gemspec +4 -3
- data/lib/creact.rb +1 -0
- data/lib/creact/cli.rb +28 -0
- data/lib/creact/version.rb +1 -1
- metadata +25 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b79e6bfab5327ae896ff07756678d0f90c3b3e1c
|
4
|
+
data.tar.gz: 4439f42f524b21abad0cb5403c60b15b6a8c479a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cff7d059bbe6528aeb99869f395082a6baac9fc892529e2d16a56af2e5c0c29f3f8f6991a0bec87c921f415a25187ecb802f4e6d477642038d9d747c65e376eb
|
7
|
+
data.tar.gz: 0570540162eedae105d445b71aa13478aa9791f053d48c4e5e6b0427e8e218c3b478933e57e0bcb07689d26e49c04b43ca59b2b51fdbb6fb5f8b40ac19b24936
|
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[![Gem Version](http://img.shields.io/gem/v/creact.svg)](https://rubygems.org/gems/creact)
|
2
|
+
[![Build Status](https://travis-ci.org/disavowd/creact.svg?branch=master)](https://travis-ci.org/disavowd/creact)
|
3
|
+
[![Dependency Status](https://gemnasium.com/disavowd/creact.svg)](https://gemnasium.com/disavowd/creact)
|
1
4
|
# Creact
|
2
5
|
|
3
6
|
Creact is designed to seamlessly integrate React with the [cuba](https://github.com/soveran/cuba) microframework, but is ultimately framework agnostic.
|
@@ -19,7 +22,15 @@ Or install it yourself as:
|
|
19
22
|
|
20
23
|
## Usage
|
21
24
|
|
22
|
-
|
25
|
+
First, generate the files Creact needs with:
|
26
|
+
|
27
|
+
creact generate
|
28
|
+
|
29
|
+
Ensure that you route 'home.mote' in your url config.
|
30
|
+
|
31
|
+
Then navigate to your homepage. You should see 'Hello, World'.
|
32
|
+
|
33
|
+
Congratulations - you just integrated React into your Cuba project!
|
23
34
|
|
24
35
|
## Development
|
25
36
|
|
data/bin/creact
ADDED
data/creact.gemspec
CHANGED
@@ -22,16 +22,17 @@ Gem::Specification.new do |spec|
|
|
22
22
|
end
|
23
23
|
|
24
24
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
-
spec.bindir = "
|
26
|
-
spec.executables = spec.files.grep(%r{^
|
25
|
+
spec.bindir = "bin"
|
26
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
29
|
spec.add_development_dependency "bundler", "~> 1.11"
|
30
|
-
spec.add_development_dependency "rake", "~>
|
30
|
+
spec.add_development_dependency "rake", "~> 11.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
32
|
spec.add_dependency 'opal'
|
33
33
|
spec.add_dependency 'jquery'
|
34
34
|
spec.add_dependency 'opal-jquery'
|
35
35
|
spec.add_dependency 'nokogiri'
|
36
36
|
spec.add_dependency 'reactive-ruby'
|
37
|
+
spec.add_dependency 'thor'
|
37
38
|
end
|
data/lib/creact.rb
CHANGED
data/lib/creact/cli.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module Creact
|
4
|
+
class Generate < Thor
|
5
|
+
desc "generate", "This will generate mote and js files."
|
6
|
+
long_desc <<-GENERATE
|
7
|
+
|
8
|
+
`generate` will generate the following tree in your project:
|
9
|
+
|
10
|
+
├── js\n
|
11
|
+
│ ├── jquery.js\n
|
12
|
+
│ └── react.rb\n
|
13
|
+
├── views\n
|
14
|
+
│ ├── home.mote\n
|
15
|
+
│ └── layout.mote\n
|
16
|
+
|
17
|
+
This will integrate React into your project.\n
|
18
|
+
|
19
|
+
GENERATE
|
20
|
+
# option :upcase
|
21
|
+
def generate( template=nil )
|
22
|
+
# greeting = "Hello, #{template}"
|
23
|
+
# greeting.upcase! if options[:upcase]
|
24
|
+
# puts greeting
|
25
|
+
Creact::FileOperations.run_generator
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/creact/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Bush
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '11.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '11.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,10 +122,27 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: thor
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description:
|
126
140
|
email:
|
127
141
|
- github@david-bush.co.uk
|
128
|
-
executables:
|
142
|
+
executables:
|
143
|
+
- console
|
144
|
+
- creact
|
145
|
+
- setup
|
129
146
|
extensions: []
|
130
147
|
extra_rdoc_files: []
|
131
148
|
files:
|
@@ -137,9 +154,11 @@ files:
|
|
137
154
|
- README.md
|
138
155
|
- Rakefile
|
139
156
|
- bin/console
|
157
|
+
- bin/creact
|
140
158
|
- bin/setup
|
141
159
|
- creact.gemspec
|
142
160
|
- lib/creact.rb
|
161
|
+
- lib/creact/cli.rb
|
143
162
|
- lib/creact/file_handlers.rb
|
144
163
|
- lib/creact/files/home.mote
|
145
164
|
- lib/creact/files/jquery.js
|