Skip to content

Commit 213b119

Browse files
committed
initial setup for development environment
1 parent 43ed4b1 commit 213b119

File tree

15 files changed

+5458
-0
lines changed

15 files changed

+5458
-0
lines changed

.babelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"presets": [
3+
["@babel/env", { "loose": true, "modules": false }],
4+
"@babel/react"
5+
],
6+
"plugins": [
7+
"@babel/plugin-transform-runtime"
8+
]
9+
}
10+

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/*
2+
dist/*

.eslintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": ["react-app", "plugin:jsx-a11y/recommended"],
3+
"parser": "babel-eslint",
4+
"plugins": ["jsx-a11y"],
5+
"rules": {
6+
"indent": ["error", 4],
7+
"quotes": ["error", "double"],
8+
"max-len": ["error", 350],
9+
"no-unused-vars": ["warn", { "args": "none" }],
10+
"class-methods-use-this": "off",
11+
"jsx-a11y/href-no-hash": "off",
12+
"camelcase": "error",
13+
"no-return-assign": "off",
14+
"no-noninteractive-element-to-interactive-role": "off",
15+
"no-console": ["error", { "allow": ["log", "error", "warn"] }]
16+
}
17+
}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
.vscode
3+
4+
dist
5+
node_modules
6+
7+
npm-debug.log
8+
yarn-debug.log
9+
yarn-error.log

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
.vscode
3+
.git*
4+
5+
node_modules
6+
npm-debug.log
7+
yarn-debug.log
8+
yarn-error.log

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Change Log
2+
3+
1.0.0 (September 7, 2018)
4+
- initial setup for development environment.
5+
- config rollup for making react component.
6+
- config webpack for local testing.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# react-image-slider
2+
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kimcoder/react-image-slider/blob/master/LICENSE)
3+
4+
Simple ImageSlider Component for ReactJS v16.0
5+
6+
# Install
7+
8+
# Usage

example/App.jsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
import CssBaseline from "@material-ui/core/CssBaseline";
4+
import AppBar from "@material-ui/core/AppBar";
5+
import ImageSlider from "..";
6+
7+
// https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
8+
class App extends React.Component {
9+
constructor() {
10+
super();
11+
console.log("[App constructor]");
12+
this.state = {};
13+
}
14+
15+
componentDidMount() {
16+
console.log("[App componentDidMount]");
17+
}
18+
19+
static getDerivedStateFromProps(props, state) {
20+
console.log("[App getDerivedStateFromProps]");
21+
return null;
22+
}
23+
24+
getSnapshotBeforeUpdate(prevProps, prevState) {
25+
console.log("[App getSnapshotBeforeUpdate]");
26+
}
27+
28+
componentDidUpdate(prevProps, prevState, snapshot) {
29+
console.log("[App componentDidUpdate]");
30+
}
31+
32+
render() {
33+
return (
34+
<div style={{ textAlign: "center" }}>
35+
<CssBaseline/>
36+
<AppBar position="stickey" style={{ height: 100, textAlign: "center" }}>
37+
<h1>Image Slider Example</h1>
38+
</AppBar>
39+
<ImageSlider/>
40+
</div>
41+
);
42+
}
43+
}
44+
45+
ReactDOM.render(<App/>, document.getElementById("App"));

example/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="ko">
3+
<head>
4+
<title>React Image Slider Example</title>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
</head>
9+
<body>
10+
<div id="App"></div>
11+
<script src="index.js"></script>
12+
</body>
13+
</html>

example/index.js

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)