Skip to content

Commit d4e0c94

Browse files
committed
ReactOnRails geneated app
linted app with bundle exec rails generate react_on_rails:install -R -S -H -L
1 parent 21a4118 commit d4e0c94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1544
-39
lines changed

.buildpacks

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
https://github.com/heroku/heroku-buildpack-nodejs.git
2+
https://github.com/heroku/heroku-buildpack-ruby.git

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@
1515
/log/*
1616
!/log/.keep
1717
/tmp
18+
# React on Rails
19+
npm-debug.log
20+
node_modules
21+
22+
# Generated js bundles
23+
/app/assets/javascripts/generated/*

.rubocop.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This is the configuration used to check the rubocop source code.
2+
# Check out: https://github.com/bbatsov/rubocop
3+
4+
AllCops:
5+
Include:
6+
- '**/Rakefile'
7+
- '**/config.ru'
8+
Exclude:
9+
- 'vendor/**/*'
10+
- 'spec/fixtures/**/*'
11+
- 'node_modules/**/*'
12+
- 'db/**/*'
13+
- 'db/schema.rb'
14+
- 'db/seeds.rb'
15+
- 'client/node_modules/**/*'
16+
- 'bin/**/*'
17+
- !ruby/regexp /old_and_unused\.rb$/
18+
19+
Metrics/LineLength:
20+
Max: 120
21+
22+
Style/StringLiterals:
23+
EnforcedStyle: double_quotes
24+
25+
Style/Documentation:
26+
Enabled: false

.scss-lint.yml

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# See http://sass-guidelin.es/#zeros
2+
3+
scss_files:
4+
- 'app/assets/stylesheets/**/*.scss'
5+
- 'client/assets/stylesheets/**/*.scss'
6+
7+
linters:
8+
# BangFormat:
9+
# enabled: true
10+
# space_before_bang: true
11+
# space_after_bang: false
12+
#
13+
# BorderZero:
14+
# enabled: true
15+
# convention: zero # or `none`
16+
#
17+
ColorKeyword:
18+
enabled: false
19+
ColorVariable:
20+
enabled: false
21+
#
22+
# Comment:
23+
# enabled: true
24+
#
25+
# DebugStatement:
26+
# enabled: true
27+
#
28+
# DeclarationOrder:
29+
# enabled: true
30+
#
31+
# DuplicateProperty:
32+
# enabled: true
33+
#
34+
# ElsePlacement:
35+
# enabled: true
36+
# style: same_line # or 'new_line'
37+
#
38+
# EmptyLineBetweenBlocks:
39+
# enabled: true
40+
# ignore_single_line_blocks: true
41+
#
42+
# EmptyRule:
43+
# enabled: true
44+
#
45+
# FinalNewline:
46+
# enabled: true
47+
# present: true
48+
#
49+
HexLength:
50+
enabled: true
51+
style: long
52+
53+
HexNotation:
54+
enabled: true
55+
style: uppercase
56+
#
57+
# HexValidation:
58+
# enabled: true
59+
#
60+
IdSelector:
61+
enabled: true
62+
#
63+
# ImportantRule:
64+
# enabled: true
65+
#
66+
# ImportPath:
67+
# enabled: true
68+
# leading_underscore: false
69+
# filename_extension: false
70+
#
71+
# Indentation:
72+
# enabled: true
73+
# allow_non_nested_indentation: false
74+
# character: space # or 'tab'
75+
# width: 2
76+
#
77+
LeadingZero:
78+
enabled: true
79+
style: include_zero
80+
#
81+
# MergeableSelector:
82+
# enabled: true
83+
# force_nesting: true
84+
#
85+
# NameFormat:
86+
# enabled: true
87+
# allow_leading_underscore: true
88+
# convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
89+
#
90+
# NestingDepth:
91+
# enabled: true
92+
# max_depth: 3
93+
#
94+
# PlaceholderInExtend:
95+
# enabled: true
96+
#
97+
# PropertyCount:
98+
# enabled: false
99+
# include_nested: false
100+
# max_properties: 10
101+
#
102+
# PropertyUnits:
103+
# enabled: true
104+
# global: [
105+
# 'ch', 'em', 'ex', 'rem', # Font-relative lengths
106+
# 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths
107+
# 'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
108+
# 'deg', 'grad', 'rad', 'turn', # Angle
109+
# 'ms', 's', # Duration
110+
# 'Hz', 'kHz', # Frequency
111+
# 'dpi', 'dpcm', 'dppx', # Resolution
112+
# '%', # Other
113+
# ]
114+
# properties: {}
115+
#
116+
# PropertySortOrder:
117+
# enabled: true
118+
# ignore_unspecified: false
119+
# separate_groups: false
120+
#
121+
# PropertySpelling:
122+
# enabled: true
123+
# extra_properties: []
124+
#
125+
# QualifyingElement:
126+
# enabled: true
127+
# allow_element_with_attribute: false
128+
# allow_element_with_class: false
129+
# allow_element_with_id: false
130+
#
131+
# SelectorDepth:
132+
# enabled: true
133+
# max_depth: 3
134+
#
135+
# SelectorFormat:
136+
# enabled: true
137+
# convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
138+
#
139+
# Shorthand:
140+
# enabled: true
141+
# allowed_shorthands: [1, 2, 3]
142+
#
143+
# SingleLinePerProperty:
144+
# enabled: true
145+
# allow_single_line_rule_sets: true
146+
#
147+
# SingleLinePerSelector:
148+
# enabled: true
149+
#
150+
# SpaceAfterComma:
151+
# enabled: true
152+
#
153+
# SpaceAfterPropertyColon:
154+
# enabled: true
155+
# style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
156+
#
157+
# SpaceAfterPropertyName:
158+
# enabled: true
159+
#
160+
# SpaceBeforeBrace:
161+
# enabled: true
162+
# style: space # or 'new_line'
163+
# allow_single_line_padding: false
164+
#
165+
# SpaceBetweenParens:
166+
# enabled: true
167+
# spaces: 0
168+
#
169+
# StringQuotes:
170+
# enabled: true
171+
# style: single_quotes # or double_quotes
172+
#
173+
# TrailingSemicolon:
174+
# enabled: true
175+
#
176+
# TrailingZero:
177+
# enabled: false
178+
#
179+
# UnnecessaryMantissa:
180+
# enabled: true
181+
#
182+
# UnnecessaryParentReference:
183+
# enabled: true
184+
#
185+
# UrlFormat:
186+
# enabled: true
187+
#
188+
# UrlQuotes:
189+
# enabled: true
190+
#
191+
# VariableForProperty:
192+
# enabled: false
193+
# properties: []
194+
#
195+
# VendorPrefix:
196+
# enabled: true
197+
# identifier_list: base
198+
# additional_identifiers: []
199+
# excluded_identifiers: []
200+
#
201+
# ZeroUnit:
202+
# enabled: true
203+
#
204+
# Compass::*:
205+
# enabled: false

Gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,19 @@ group :development do
4646
gem 'spring'
4747
end
4848

49+
50+
gem 'therubyracer', platforms: :ruby
51+
52+
# require: false is necessary for the linters as we only want them loaded
53+
# when used by the linting rake tasks.
54+
group :development do
55+
gem("rubocop", require: false)
56+
gem("ruby-lint", require: false)
57+
gem("scss_lint", require: false)
58+
end
59+
60+
# For Heroku deployment
61+
gem 'rails_12factor', group: :production
62+
gem 'puma', group: :production
63+
64+
gem 'bootstrap-sass'

Gemfile.lock

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,17 @@ GEM
3737
thread_safe (~> 0.3, >= 0.3.4)
3838
tzinfo (~> 1.1)
3939
arel (6.0.3)
40+
ast (2.2.0)
41+
astrolabe (1.3.1)
42+
parser (~> 2.2)
43+
autoprefixer-rails (6.2.3)
44+
execjs
45+
json
4046
binding_of_caller (0.7.2)
4147
debug_inspector (>= 0.0.1)
48+
bootstrap-sass (3.3.6)
49+
autoprefixer-rails (>= 5.2.1)
50+
sass (>= 3.3.4)
4251
builder (3.2.2)
4352
byebug (8.2.1)
4453
coffee-rails (4.1.1)
@@ -64,6 +73,7 @@ GEM
6473
railties (>= 4.2.0)
6574
thor (>= 0.14, < 2.0)
6675
json (1.8.3)
76+
libv8 (3.16.14.13)
6777
loofah (2.0.3)
6878
nokogiri (>= 1.5.9)
6979
mail (2.6.3)
@@ -74,6 +84,10 @@ GEM
7484
multi_json (1.11.2)
7585
nokogiri (1.6.7.1)
7686
mini_portile2 (~> 2.0.0.rc2)
87+
parser (2.2.3.0)
88+
ast (>= 1.1, < 3.0)
89+
powerpack (0.1.1)
90+
puma (2.12.2)
7791
rack (1.6.4)
7892
rack-test (0.6.3)
7993
rack (>= 1.0)
@@ -96,6 +110,11 @@ GEM
96110
rails-deprecated_sanitizer (>= 1.0.1)
97111
rails-html-sanitizer (1.0.2)
98112
loofah (~> 2.0)
113+
rails_12factor (0.0.3)
114+
rails_serve_static_assets
115+
rails_stdout_logging
116+
rails_serve_static_assets (0.0.4)
117+
rails_stdout_logging (0.0.4)
99118
railties (4.2.5)
100119
actionpack (= 4.2.5)
101120
activesupport (= 4.2.5)
@@ -110,16 +129,32 @@ GEM
110129
execjs (~> 2.5)
111130
rails (>= 3.2)
112131
rainbow (~> 2.0)
132+
ref (2.0.0)
133+
rubocop (0.35.1)
134+
astrolabe (~> 1.3)
135+
parser (>= 2.2.3.0, < 3.0)
136+
powerpack (~> 0.1)
137+
rainbow (>= 1.99.1, < 3.0)
138+
ruby-progressbar (~> 1.7)
139+
tins (<= 1.6.0)
140+
ruby-lint (2.0.5)
141+
parser (~> 2.2)
142+
slop (~> 3.4, >= 3.4.7)
143+
ruby-progressbar (1.7.5)
113144
sass (3.4.20)
114145
sass-rails (5.0.4)
115146
railties (>= 4.0.0, < 5.0)
116147
sass (~> 3.1)
117148
sprockets (>= 2.8, < 4.0)
118149
sprockets-rails (>= 2.0, < 4.0)
119150
tilt (>= 1.1, < 3)
151+
scss_lint (0.43.2)
152+
rainbow (~> 2.0)
153+
sass (~> 3.4.15)
120154
sdoc (0.4.1)
121155
json (~> 1.7, >= 1.7.7)
122156
rdoc (~> 4.0)
157+
slop (3.6.0)
123158
spring (1.6.2)
124159
sprockets (3.5.2)
125160
concurrent-ruby (~> 1.0)
@@ -129,9 +164,13 @@ GEM
129164
activesupport (>= 4.0)
130165
sprockets (>= 3.0.0)
131166
sqlite3 (1.3.11)
167+
therubyracer (0.12.2)
168+
libv8 (~> 3.16.14.0)
169+
ref
132170
thor (0.19.1)
133171
thread_safe (0.3.5)
134172
tilt (2.0.2)
173+
tins (1.6.0)
135174
turbolinks (2.5.3)
136175
coffee-rails
137176
tzinfo (1.2.2)
@@ -149,16 +188,23 @@ PLATFORMS
149188
ruby
150189

151190
DEPENDENCIES
191+
bootstrap-sass
152192
byebug
153193
coffee-rails (~> 4.1.0)
154194
jbuilder (~> 2.0)
155195
jquery-rails
196+
puma
156197
rails (= 4.2.5)
198+
rails_12factor
157199
react_on_rails (~> 2.0.0.rc.3)
200+
rubocop
201+
ruby-lint
158202
sass-rails (~> 5.0)
203+
scss_lint
159204
sdoc (~> 0.4.0)
160205
spring
161206
sqlite3
207+
therubyracer
162208
turbolinks
163209
uglifier (>= 1.3.0)
164210
web-console (~> 2.0)

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: bundle exec puma -C config/puma.rb

Procfile.dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
web: rails s
2+
client: sh -c 'rm app/assets/javascripts/generated/* || true && cd client && npm run build:dev:client'
3+
server: sh -c 'cd client && npm run build:dev:server'

Procfile.dev-hot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
web: rails s
2+
# TODO: MIGRATE from tutorial
3+
client: sh -c 'rm app/assets/javascripts/generated/* || true && cd client && npm run build:dev:client'
4+
server: sh -c 'cd client && npm run build:dev:server'

0 commit comments

Comments
 (0)