-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 792f105
Showing
64 changed files
with
9,636 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FB_API_KEY = | ||
FB_AUTH_DOMAIN = | ||
FB_DATABASE_URL = | ||
FB_STORAGE_BUCKET = | ||
FB_MESSAGING_SENDER_ID = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "react-redux-firebase-3541f" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
### gibo dump node | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
|
||
### gibo dump macOS | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### build directory | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": all, | ||
"semi": true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Try Firebase with react-redux-firebase | ||
|
||
- [react-redux-firebase](https://github.com/prescottprue/react-redux-firebase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const presets = [ | ||
"@babel/react", | ||
"@babel/typescript", | ||
[ | ||
"@babel/env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
]; | ||
|
||
const plugins = [ | ||
"@babel/proposal-class-properties", | ||
"@babel/proposal-object-rest-spread", | ||
"@babel/plugin-syntax-dynamic-import", | ||
]; | ||
|
||
process.env["NODE_ENV"] === 'production' && plugins.push("react-remove-properties"); | ||
|
||
module.exports = { presets, plugins }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"firestore": { | ||
"rules": "firestore.rules", | ||
"indexes": "firestore.indexes.json" | ||
}, | ||
"hosting": { | ||
"public": "dist", | ||
"ignore": [ | ||
"firebase.json", | ||
"**/.*", | ||
"**/node_modules/**" | ||
], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Example: | ||
// | ||
// "indexes": [ | ||
// { | ||
// "collectionId": "widgets", | ||
// "fields": [ | ||
// { "fieldPath": "foo", "mode": "ASCENDING" }, | ||
// { "fieldPath": "bar", "mode": "DESCENDING" } | ||
// ] | ||
// } | ||
// ] | ||
"indexes": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
match /{document=**} { | ||
allow read, write; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
roots: [ | ||
"<rootDir>/src" | ||
], | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest", | ||
}, | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | ||
moduleFileExtensions: [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
], | ||
//"snapshotSerializers": ["enzyme-to-json/serializer"], | ||
setupTestFrameworkScriptFile: "<rootDir>src/setupTests.ts" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"name": "react-ts-starter", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "NODE_ENV=production webpack", | ||
"start": "NODE_ENV=development webpack-dev-server", | ||
"lint": "tslint 'src/**/*.ts{,x}' -p tsconfig.json", | ||
"tslint-check": "tslint-config-prettier-check ./tslint.json", | ||
"type": "tsc #", | ||
"test": "jest", | ||
"precommit": "lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.{ts,tsx}": [ | ||
"yarn lint --fix", | ||
"yarn lint", | ||
"yarn type", | ||
"git add" | ||
] | ||
}, | ||
"dependencies": { | ||
"@material-ui/core": "^3.2.2", | ||
"@material-ui/icons": "^3.0.1", | ||
"@types/classnames": "^2.2.6", | ||
"@types/react": "^16.4.13", | ||
"@types/react-dom": "^16.0.7", | ||
"@types/react-redux": "^6.0.7", | ||
"@types/react-router-config": "^1.0.9", | ||
"@types/react-router-dom": "^4.3.1", | ||
"@types/recompose": "^0.27.0", | ||
"classnames": "^2.2.6", | ||
"connected-react-router": "^5.0.1", | ||
"firebase": "^5.5.8", | ||
"formik": "^1.3.1", | ||
"history": "^4.7.2", | ||
"loadable-components": "^2.2.3", | ||
"react": "^16.4.1", | ||
"react-dom": "^16.4.1", | ||
"react-redux": "^5.0.7", | ||
"react-redux-firebase": "^2.2.1", | ||
"react-router-config": "^4.4.0-beta.6", | ||
"react-router-dom": "^4.3.1", | ||
"recompose": "^0.30.0", | ||
"redux": "^4.0.0", | ||
"redux-firestore": "^0.5.8", | ||
"redux-observable": "^1.0.0", | ||
"redux-thunk": "^2.3.0", | ||
"rxjs": "^6.3.3", | ||
"typeface-roboto": "^0.0.54" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.1.2", | ||
"@babel/core": "^7.1.2", | ||
"@babel/plugin-proposal-class-properties": "^7.1.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0", | ||
"@babel/plugin-syntax-dynamic-import": "^7.0.0", | ||
"@babel/preset-env": "^7.1.0", | ||
"@babel/preset-react": "^7.0.0", | ||
"@babel/preset-typescript": "^7.1.0", | ||
"@types/dotenv": "^4.0.3", | ||
"@types/enzyme": "^3.1.14", | ||
"@types/enzyme-adapter-react-16": "^1.0.3", | ||
"@types/jest": "^23.3.8", | ||
"@types/redux-mock-store": "^1.0.0", | ||
"babel-loader": "^8.0.4", | ||
"babel-plugin-react-remove-properties": "^0.2.5", | ||
"css-loader": "^1.0.1", | ||
"dotenv": "^6.1.0", | ||
"dotenv-webpack": "^1.5.7", | ||
"enzyme": "^3.7.0", | ||
"enzyme-adapter-react-16": "^1.6.0", | ||
"enzyme-to-json": "^3.3.4", | ||
"file-loader": "^2.0.0", | ||
"html-webpack-externals-plugin": "^3.8.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"husky": "^1.0.0", | ||
"jest": "^23.6.0", | ||
"lint-staged": "^8.0.0", | ||
"mini-css-extract-plugin": "^0.4.4", | ||
"prettier": "^1.14.3", | ||
"redux-mock-store": "^1.5.3", | ||
"source-map-loader": "^0.2.4", | ||
"style-loader": "^0.23.1", | ||
"terser-webpack-plugin": "^1.1.0", | ||
"ts-jest": "^23.10.4", | ||
"tslint": "^5.11.0", | ||
"tslint-config-airbnb": "^5.11.0", | ||
"tslint-config-prettier": "^1.15.0", | ||
"tslint-plugin-prettier": "^2.0.0", | ||
"tslint-react": "^3.6.0", | ||
"typescript": "^3.1.3", | ||
"webpack": "^4.23.1", | ||
"webpack-bundle-analyzer": "^3.0.3", | ||
"webpack-cli": "^3.1.2", | ||
"webpack-dev-server": "^3.1.10", | ||
"webpack-merge": "^4.1.4", | ||
"why-did-you-update": "^1.0.6" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"extends": [ | ||
"config:base", | ||
":preserveSemverRanges" | ||
], | ||
"timezone": "Asia/Tokyo", | ||
"schedule": "before 4am", | ||
"automerge": true, | ||
"major": { | ||
"automerge": false | ||
}, | ||
"packageRules": [ | ||
{ | ||
"updateTypes": [ | ||
"major" | ||
], | ||
"labels": [ | ||
"UPDATE-MAJOR" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import * as React from 'react'; | ||
import { renderRoutes, RouteConfig } from 'react-router-config'; | ||
import { compose, withStateHandlers, StateHandlerMap } from 'recompose'; | ||
import 'typeface-roboto'; | ||
import CssBaseline from '@material-ui/core/CssBaseline'; | ||
import { MuiThemeProvider } from '@material-ui/core/styles'; | ||
import { theme } from '../theme'; | ||
import { Main } from '../templates/Main'; | ||
|
||
interface Props { | ||
route: RouteConfig; | ||
} | ||
|
||
export interface State { | ||
sideOpen: boolean; | ||
} | ||
|
||
export interface StateHandlers { | ||
setSideOpen: (_: React.SyntheticEvent) => void; | ||
} | ||
|
||
export type EnhancedProps = State & StateHandlers & Props; | ||
|
||
const enhancer = compose<EnhancedProps, Props>( | ||
withStateHandlers<State, StateHandlerMap<State>, Props>( | ||
{ sideOpen: false }, | ||
{ | ||
setSideOpen: ({ sideOpen }) => () => ({ | ||
sideOpen: !sideOpen, | ||
}), | ||
}, | ||
), | ||
); | ||
|
||
export const AppComponent: React.SFC<EnhancedProps> = ({ | ||
route, | ||
sideOpen, | ||
setSideOpen, | ||
}) => ( | ||
<MuiThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Main sideOpen={sideOpen} setSideOpen={setSideOpen}> | ||
{renderRoutes(route.routes)} | ||
</Main> | ||
</MuiThemeProvider> | ||
); | ||
|
||
export const App = enhancer(AppComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './App'; |
Oops, something went wrong.