Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add React&Redux boilerplate #1

Open
wants to merge 1 commit into
base: for-review
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
[
"@babel/env",
{
"modules": "false",
"targets": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

진우전임 작업한 쪽하고 스타일이 다른데 논의해서 통일하시죠.

 {
   "presets": [
     ["@babel/env", {
       "modules": "umd",
       "targets": {
         "browsers": ["last 2 versions", "not ie <= 8"]
       }
     }]
   ],
   "plugins": ["@babel/plugin-proposal-object-rest-spread"]
 }

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"browsers": [
"last 2 versions",
"not ie <= 8"
]
}
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
]
}

37 changes: 37 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
classes: true,
jsx: true
},
ecmaVersion: 7,
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true
},
extends: ['tui', 'plugin:react/recommended', 'plugin:prettier/recommended'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugins: ['react', 'prettier'],
rules: {
indent: [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

디폴트값이면 제거합시다.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네. 여기도 react plugin 제외하고 ES6와 동일한데요, 논의후 수정하겠습니다.

2,
2,
{
SwitchCase: 1,
ignoreComments: false,
ImportDeclaration: 1,
flatTernaryExpressions: false
}
]
},
settings: {
react: {
pragma: 'React',
version: '16.3'
}
}
};
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "none",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 디폴트값이면 제거하고, 필요한 부분은 주석 가이드로 대체해요.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

별도의 주석 가이드가 필요한가요?
es6보일러플레이트에서 그대로 가져왔는데 이부분은 논의해서 제거하거나 필요한부분만 남기겠습니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

es6쪽에 변경사항 그대로 반영하면 될거 같아요.

"printWidth": 120,
"singleQuote": true,
"bracketSpacing": false,
"tabWidth": 2,
"jsxBracketSameLine": false
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 박정환

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# React.js & Redux Boilerplate

## Included Modules

#### Webpack
* [webpack](https://webpack.js.org/)
* [webpack-dev-server](https://github.com/webpack/webpack-dev-server)
* [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin)
* [optimize-css-assets-webpack-plugin](https://www.npmjs.com/package/optimize-css-assets-webpack-plugin)

#### React
* [prop-types](https://github.com/facebook/prop-types)
* [react](https://github.com/facebook/react)
* [react-dom](https://github.com/facebook/react/tree/master/packages/react-dom)
* [react-redux](https://github.com/reduxjs/react-redux)
* [redux](https://github.com/reduxjs/redux)

#### Babel
* [babel](https://babeljs.io/)
* [@babel/polyfill](https://babeljs.io/docs/en/babel-polyfill)
* [@babel/preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
* [@babel/preset-react](https://github.com/babel/babel/tree/master/packages/babel-preset-react)
* [@babel/plugin-proposal-class-properties](https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties)
* [@babel/plugin-proposal-object-rest-spread](https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread)


#### ESLint
* [eslint](https://eslint.org/)
* [babel-eslint](https://github.com/babel/babel-eslint)
* [eslint-config-tui](https://github.com/nhnent/tui.eslint.config)
* [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)
* [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
* [eslint-plugin-react](https://github.com/prettier/eslint-plugin-react)

#### Prettier
* [prettier](https://prettier.io/)

## Browser support

#### Supports all browsers that are ES5-compliant

- IE8 and below are not supported

## Getting started

1. Gets the git project.
```
git clone https://github.com/junghwan-park/react-boilerplate.git
```
2. Run the installation from the internal repo directory.
```
npm install
```
3. Start the webpack-dev-server.
```
npm run dev
```
4. Open http://localhost:8080 in your browser.

## Commands
* `npm run dev` - Start webpack-dev-server.
* `npm run lint` - Run ESLint.
* `npm run build` - Bundle and minify resources into `/dist` directory.
* `npm run build-dev` - Bundle resources into `/dist` directory.
Loading