Skip to content

Main #192

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

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Main #192

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
07b6d19
init test
kakichi-yu Mar 9, 2023
0f49686
init commit
kakichi-yu Mar 9, 2023
316ee2d
init
kakichi-yu Mar 11, 2023
794e198
mm
kakichi-yu Mar 11, 2023
f4e5edd
HelloReact
kakichi-yu Mar 12, 2023
f615b05
properties
kakichi-yu Mar 12, 2023
e63d949
state
kakichi-yu Mar 12, 2023
6bb4185
init
kakichi-yu Mar 13, 2023
afd361c
callback
kakichi-yu Mar 13, 2023
7152efd
refactor
kakichi-yu Mar 13, 2023
fda92e3
init
kakichi-yu Mar 13, 2023
a1bb304
enable
kakichi-yu Mar 13, 2023
9788921
init
kakichi-yu Mar 14, 2023
4bdf6bf
colorpicker
kakichi-yu Mar 14, 2023
7a590b9
colorpickerrefactor
kakichi-yu Mar 15, 2023
d026e49
init 途中
kakichi-yu Mar 16, 2023
10f32b3
children is error
kakichi-yu Mar 18, 2023
5e80896
tablemock
kakichi-yu Mar 18, 2023
bf69675
excisize
kakichi-yu Mar 18, 2023
f7a7404
syusei
kakichi-yu Mar 19, 2023
c08b801
table mock end
kakichi-yu Mar 19, 2023
4415b08
table axios
kakichi-yu Mar 19, 2023
e1261ff
react router
kakichi-yu Mar 20, 2023
902d41f
v6 unUsed RouteComponentProps
kakichi-yu Mar 21, 2023
88c870a
history使えるのか問題
kakichi-yu Mar 22, 2023
f9e58a8
refactor
kakichi-yu Mar 24, 2023
833d7d6
implements LoginApi
kakichi-yu Mar 25, 2023
9c42741
残すはスタイル!
kakichi-yu Mar 26, 2023
670c01d
makeStyles -> styled
kakichi-yu Mar 26, 2023
4c86480
end LoginForm
kakichi-yu Mar 27, 2023
4b861b8
FormValidation
kakichi-yu Mar 28, 2023
7e32a2b
残すはリファクタ
kakichi-yu Mar 29, 2023
0d7d519
Context
kakichi-yu Mar 30, 2023
a65782f
context
kakichi-yu Apr 1, 2023
4d7512c
この書き方だとレンダリングはうまくいく
kakichi-yu Apr 2, 2023
ce6c9f1
context end!
kakichi-yu Apr 2, 2023
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
47 changes: 21 additions & 26 deletions hooks/00_BoilerPlate/package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"name": "react-typescript-by-sample",
"name": "00_boilerplate",
"version": "1.0.0",
"description": "React Typescript examples",
"description": "In this sample we setup the basic plumbing to \"build\" our project and launch it in a dev server.",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --mode development --inline --hot --open",
"start": "webpack-dev-server --mode development --hot --open",
"build": "webpack --mode development"
},
"keywords": [
"react",
"typescript",
"hooks"
],
"author": "Braulio Diez Botella",
"license": "MIT",
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.10.5",
"@babel/polyfill": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.1.0",
"css-loader": "^3.6.0",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"mini-css-extract-plugin": "^0.9.0",
"style-loader": "^1.2.1",
"typescript": "^3.9.7",
"url-loader": "^4.1.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.0",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.20.2",
"babel-loader": "^9.1.2",
"css-loader": "^6.7.3",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.7.3",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.2",
"typescript": "^4.9.5",
"url-loader": "^4.1.1",
"webpack": "^5.76.1",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
}
}
15 changes: 9 additions & 6 deletions hooks/00_BoilerPlate/src/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<!DOCTYPE html>
<html>
<head>

<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
</head>

<body>
<div class="well">
<h1>Sample app</h1>
<h1>Sample app</h1>
</div>
</body>
</html>
</body>

</html>
117 changes: 57 additions & 60 deletions hooks/00_BoilerPlate/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,60 @@
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const webpack = require("webpack");
const path = require("path");
var HtmlWebpackPlugin = require("html-webpack-plugin");
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
var webpack = require("webpack");
var path = require("path");

const basePath = __dirname;
var basePath = __dirname;

module.exports = {
context: path.join(basePath, "src"),
resolve: {
extensions: [".js", ".ts", ".tsx"],
},
entry: ["@babel/polyfill", "./main.ts"],
output: {
path: path.join(basePath, "dist"),
filename: "bundle.js",
},
devtool: "source-map",
devServer: {
contentBase: "./dist", // Content base
inline: true, // Enable watch and live reload
host: "localhost",
port: 8080,
stats: "errors-only",
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
loader: "awesome-typescript-loader",
options: {
useBabel: true,
babelCore: "@babel/core", // needed for Babel v7
},
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader"],
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: "file-loader",
options: {
name: "assets/img/[name].[ext]?[hash]",
esModule: false,
},
},
],
},
plugins: [
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: "index.html", //Name of file in ./dist/
template: "index.html", //Name of template in ./src
hash: true,
}),
new MiniCssExtractPlugin({
filename: "[name].css",
chunkFilename: "[id].css",
}),
],
};
context: path.join(basePath, "src"),
resolve: {
extensions: [".js", ".ts", ".tsx"]
},
entry: ["@babel/polyfill", "./main.ts"],
output: {
path: path.join(basePath, "dist"),
filename: "bundle.js"
},
devtool: "source-map",
devServer: {
// inline: true, // Enable watch and live reload
// host: "localhost",
// port: 8080,
// stats: "errors-only",
static: {
directory: "./dist",
}
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
loader: "ts-loader",
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader"]
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: "file-loader",
options: {
name: "assets/img/[name].[ext]?[hash]"
}
}
]
},
plugins: [
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: "index.html", //Name of file in ./dist/
template: "index.html", //Name of template in ./src
hash: true
}),
new MiniCssExtractPlugin({
filename: "[name].css",
chunkFilename: "[id].css"
})
]
};
10 changes: 0 additions & 10 deletions hooks/01_HelloReact/.babelrc

This file was deleted.

42 changes: 20 additions & 22 deletions hooks/01_HelloReact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "React Typescript examples",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --mode development --inline --hot --open",
"start": "webpack-dev-server --mode development --hot --open",
"build": "webpack --mode development"
},
"keywords": [
Expand All @@ -15,27 +15,25 @@
"author": "Braulio Diez Botella",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.10.5",
"@babel/polyfill": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@types/react": "^16.9.43",
"@types/react-dom": "^16.9.8",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.1.0",
"css-loader": "^3.6.0",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"mini-css-extract-plugin": "^0.9.0",
"style-loader": "^1.2.1",
"typescript": "^3.9.7",
"url-loader": "^4.1.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.0",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.20.2",
"babel-loader": "^9.1.2",
"css-loader": "^6.7.3",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.7.3",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.2",
"typescript": "^4.9.5",
"url-loader": "^4.1.1",
"webpack": "^5.76.1",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
},
"dependencies": {
"react": "^16.13.1",
"react-dom": "^16.13.1"
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
}
53 changes: 25 additions & 28 deletions hooks/01_HelloReact/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,60 @@
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const webpack = require("webpack");
const path = require("path");
var HtmlWebpackPlugin = require("html-webpack-plugin");
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
var webpack = require("webpack");
var path = require("path");

const basePath = __dirname;
var basePath = __dirname;

module.exports = {
context: path.join(basePath, "src"),
resolve: {
extensions: [".js", ".ts", ".tsx"],
extensions: [".js", ".ts", ".tsx"]
},
entry: ["@babel/polyfill", "./index.tsx"],
output: {
path: path.join(basePath, "dist"),
filename: "bundle.js",
filename: "bundle.js"
},
devtool: "source-map",
devServer: {
contentBase: "./dist", // Content base
inline: true, // Enable watch and live reload
host: "localhost",
port: 8080,
stats: "errors-only",
// inline: true, // Enable watch and live reload
// host: "localhost",
// port: 8080,
// stats: "errors-only",
static: {
directory: "./dist",
}
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
loader: "awesome-typescript-loader",
options: {
useBabel: true,
babelCore: "@babel/core", // needed for Babel v7
},
loader: "ts-loader",
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader"],
use: [MiniCssExtractPlugin.loader, "css-loader"]
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: "file-loader",
options: {
name: "assets/img/[name].[ext]?[hash]",
esModule: false,
},
},
],
name: "assets/img/[name].[ext]?[hash]"
}
}
]
},
plugins: [
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: "index.html", //Name of file in ./dist/
template: "index.html", //Name of template in ./src
hash: true,
hash: true
}),
new MiniCssExtractPlugin({
filename: "[name].css",
chunkFilename: "[id].css",
}),
],
};
chunkFilename: "[id].css"
})
]
};
10 changes: 0 additions & 10 deletions hooks/02_Properties/.babelrc

This file was deleted.

Loading