Skip to content

Commit 5df4cc4

Browse files
committed
Initial commit.
0 parents  commit 5df4cc4

File tree

3,846 files changed

+990540
-0
lines changed

Some content is hidden

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

3,846 files changed

+990540
-0
lines changed

.gitignore

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
106+
# Vscode file tree
107+
.vscode
108+
109+
# MacOS file tree
110+
.DS_store

Gemfile

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
source 'https://rubygems.org'
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby '2.6.1'
5+
6+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
7+
gem 'rails', '~> 6.0.0'
8+
# Use postgresql as the database for Active Record
9+
gem 'pg', '>= 0.18', '< 2.0'
10+
# Use Puma as the app server
11+
gem "puma", ">= 4.3.3"
12+
# Use SCSS for stylesheets
13+
gem 'sass-rails', '~> 5'
14+
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
15+
gem 'webpacker', '~> 4.0'
16+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
17+
gem 'turbolinks', '~> 5'
18+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
19+
gem 'jbuilder', '~> 2.7'
20+
# Use Redis adapter to run Action Cable in production
21+
# gem 'redis', '~> 4.0'
22+
# Use Active Model has_secure_password
23+
# gem 'bcrypt', '~> 3.1.7'
24+
25+
gem "nokogiri", ">= 1.10.8"
26+
gem "rack", ">= 2.0.8"
27+
28+
29+
# Use Active Storage variant
30+
# gem 'image_processing', '~> 1.2'
31+
32+
# Reduces boot times through caching; required in config/boot.rb
33+
gem 'bootsnap', '>= 1.4.2', require: false
34+
35+
group :development, :test do
36+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
37+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
38+
end
39+
40+
group :development do
41+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
42+
gem 'web-console', '>= 3.3.0'
43+
gem 'listen', '>= 3.0.5', '< 3.2'
44+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
45+
gem 'spring'
46+
gem 'spring-watcher-listen', '~> 2.0.0'
47+
end
48+
49+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
50+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

README.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Rails + Webpack + React + Heroku
2+
3+
This starter app provides you with all you need to start developing reaction. The project uses rails with webpacker gem that provides the tooling a modern full-stack workflow needs. The webpacker gem provides the following functionality:
4+
5+
1. Bundle all your front-end code into one file
6+
2. Compile JSX to JavaScript
7+
3. Compile ES6 code to ES5
8+
9+
You can read more about the gem on their [Github page](https://github.com/rails/webpacker)
10+
11+
## Directory Structure
12+
The directory structure is basically the same as any rails application but with the following differences:
13+
14+
1. The `app/javascript/` folder has a directory called `packs` and a host of other directories for adding your JS files to.
15+
2. Files related to front-end development like a `Gemfile`, `.babelrc`, `.eslintrc`, etc.
16+
17+
## How to set up the application
18+
- Run `bundle install` from the root directory to install ruby dependencies
19+
- Run `yarn install` to install npm packages
20+
- Run `rails db:setup` to setup the database
21+
- `rails s` to start the application
22+
23+
## Testing Rails API's
24+
The starter app already implements creating and listing boards. The associated tests are in `/test/integration/boards_api_test.rb`. Read this file to get an idea of about testing the request/response cycle of the API. To run your tests:
25+
26+
```
27+
$ bin/rails test
28+
```
29+
30+
## A note on client-side Routing
31+
Client-side routing can be a slippery concept to grasp at first. Read [this gist](https://launchschool.com/gists/d6c907f0) to get an idea of the basics.
32+
33+
## Where code should live
34+
35+
* Ruby/Rails code should continue to live in its appropriate directory within
36+
`app`.
37+
* React code should live in `app/javascript/`.
38+
* React component unit tests should use the `.test.js` extension and live next
39+
to the components being tested within `app/javascript/components/`.
40+
41+
## Useful commands
42+
43+
Run JS unit tests:
44+
45+
```
46+
$ bin/yarn run test
47+
```
48+
49+
Run eslint on files in `app/javascript/`:
50+
51+
```
52+
$ bin/yarn run lint
53+
```
54+
55+
## Deployment hints ([source](https://medium.com/@hpux/rails-5-1-loves-javascript-a1d84d5318b))
56+
57+
1. Add the nodejs and ruby buildpacks:
58+
59+
```
60+
$ heroku create
61+
$ heroku buildpacks:add --index 1 heroku/nodejs
62+
$ heroku buildpacks:add --index 2 heroku/ruby
63+
```

Rakefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative 'config/application'
5+
6+
Rails.application.load_tasks

app/assets/fonts/Facit Bold.otf

76.7 KB
Binary file not shown.

app/assets/fonts/Facit Regular.otf

76.6 KB
Binary file not shown.

app/assets/fonts/trellicons codes.png

167 KB
Loading

app/assets/fonts/trellicons.woff

14 KB
Binary file not shown.
178 KB
Binary file not shown.

app/assets/javascript/application.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This is a manifest file that'll be compiled into application.js, which will include all the files
2+
// listed below.
3+
//
4+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
5+
// vendor/assets/javascripts directory can be referenced here using a relative path.
6+
//
7+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
9+
//
10+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11+
// about supported directives.
12+
//
13+
//= require rails-ujs
14+
//= require_tree .

app/assets/javascript/cable.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Action Cable provides the framework to deal with WebSockets in Rails.
2+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
3+
//
4+
//= require action_cable
5+
//= require_self
6+
//= require_tree ./channels
7+
8+
(function() {
9+
this.App || (this.App = {});
10+
11+
App.cable = ActionCable.createConsumer();
12+
13+
}).call(this);

app/assets/javascript/channels/.keep

Whitespace-only changes.
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
4+
*
5+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
6+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
7+
*
8+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
12+
*
13+
*= require ./meyer_reset
14+
*= require ./trello-clone
15+
*= require ./dragula
16+
*= require ./pikaday
17+
*= require_self
18+
*/

app/assets/stylesheets/dragula.css

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.gu-mirror {
2+
position: fixed !important;
3+
margin: 0 !important;
4+
z-index: 9999 !important;
5+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
6+
filter: alpha(opacity=80);
7+
-ms-transform: rotate(5deg); /* IE 9 */
8+
-webkit-transform: rotate(5deg); /* Safari */
9+
transform: rotate(5deg);
10+
}
11+
.gu-hide {
12+
display: none !important;
13+
}
14+
.gu-unselectable {
15+
-webkit-user-select: none !important;
16+
-moz-user-select: none !important;
17+
-ms-user-select: none !important;
18+
user-select: none !important;
19+
}
20+
.gu-transit {
21+
border-color: transparent;
22+
box-shadow: none;
23+
border-radius: 3px;
24+
}
25+
26+
.list-wrapper.gu-transit {
27+
background-color: #00629d;
28+
}
29+
30+
#cards-container > a.gu-transit {
31+
background-color: #C4C9CC;
32+
display: block;
33+
margin: 0 8px 7px 8px
34+
}
35+
36+
.gu-transit > * {
37+
visibility: hidden;
38+
}
39+
40+
.list-wrapper.gu-mirror > .list-background {
41+
box-shadow: -2px 2px 8px rgba(0,0,0,.3), 0 0 1px rgba(0,0,0,.5);
42+
}
43+
44+
#cards-container:empty {
45+
padding-top: 10px;
46+
margin-top: -10px;
47+
}
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* http://meyerweb.com/eric/tools/css/reset/
2+
v2.0 | 20110126
3+
License: none (public domain)
4+
*/
5+
6+
html, body, div, span, applet, object, iframe,
7+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8+
a, abbr, acronym, address, big, cite, code,
9+
del, dfn, em, img, ins, kbd, q, s, samp,
10+
small, strike, strong, sub, sup, tt, var,
11+
b, u, i, center,
12+
dl, dt, dd, ol, ul, li,
13+
fieldset, form, label, legend,
14+
table, caption, tbody, tfoot, thead, tr, th, td,
15+
article, aside, canvas, details, embed,
16+
figure, figcaption, footer, header, hgroup,
17+
menu, nav, output, ruby, section, summary,
18+
time, mark, audio, video {
19+
margin: 0;
20+
padding: 0;
21+
border: 0;
22+
font-size: 100%;
23+
font: inherit;
24+
vertical-align: baseline;
25+
}
26+
/* HTML5 display-role reset for older browsers */
27+
article, aside, details, figcaption, figure,
28+
footer, header, hgroup, menu, nav, section {
29+
display: block;
30+
}
31+
body {
32+
line-height: 1;
33+
}
34+
ol, ul {
35+
list-style: none;
36+
}
37+
blockquote, q {
38+
quotes: none;
39+
}
40+
blockquote:before, blockquote:after,
41+
q:before, q:after {
42+
content: '';
43+
content: none;
44+
}
45+
table {
46+
border-collapse: collapse;
47+
border-spacing: 0;
48+
}

0 commit comments

Comments
 (0)