Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02cfd6e

Browse filesBrowse files
authored
Merge pull request Lemoncode#187 from delamux/feature/187
Feature/187
2 parents dda07f7 + 21a0f21 commit 02cfd6e
Copy full SHA for 02cfd6e

File tree

Expand file treeCollapse file tree

104 files changed

+1705
-1661
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

104 files changed

+1705
-1661
lines changed

‎hooks/00_BoilerPlate/package.json

Copy file name to clipboardExpand all lines: hooks/00_BoilerPlate/package.json
+15-15Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
"author": "Braulio Diez Botella",
1616
"license": "MIT",
1717
"devDependencies": {
18-
"@babel/cli": "^7.2.3",
19-
"@babel/core": "^7.2.2",
20-
"@babel/polyfill": "^7.2.5",
21-
"@babel/preset-env": "^7.3.1",
18+
"@babel/cli": "^7.10.5",
19+
"@babel/core": "^7.10.5",
20+
"@babel/polyfill": "^7.10.4",
21+
"@babel/preset-env": "^7.10.4",
2222
"awesome-typescript-loader": "^5.2.1",
23-
"babel-loader": "^8.0.5",
24-
"css-loader": "^2.1.0",
25-
"file-loader": "^3.0.1",
26-
"html-webpack-plugin": "^3.2.0",
27-
"mini-css-extract-plugin": "^0.5.0",
28-
"style-loader": "^0.23.1",
29-
"typescript": "^3.3.3",
30-
"url-loader": "^1.1.2",
31-
"webpack": "^4.29.3",
32-
"webpack-cli": "^3.2.3",
33-
"webpack-dev-server": "^3.1.14"
23+
"babel-loader": "^8.1.0",
24+
"css-loader": "^3.6.0",
25+
"file-loader": "^6.0.0",
26+
"html-webpack-plugin": "^4.3.0",
27+
"mini-css-extract-plugin": "^0.9.0",
28+
"style-loader": "^1.2.1",
29+
"typescript": "^3.9.7",
30+
"url-loader": "^4.1.0",
31+
"webpack": "^4.43.0",
32+
"webpack-cli": "^3.3.12",
33+
"webpack-dev-server": "^3.11.0"
3434
}
3535
}
+20-19Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
var HtmlWebpackPlugin = require("html-webpack-plugin");
2-
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
3-
var webpack = require("webpack");
4-
var path = require("path");
1+
const HtmlWebpackPlugin = require("html-webpack-plugin");
2+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3+
const webpack = require("webpack");
4+
const path = require("path");
55

6-
var basePath = __dirname;
6+
const basePath = __dirname;
77

88
module.exports = {
99
context: path.join(basePath, "src"),
1010
resolve: {
11-
extensions: [".js", ".ts", ".tsx"]
11+
extensions: [".js", ".ts", ".tsx"],
1212
},
1313
entry: ["@babel/polyfill", "./main.ts"],
1414
output: {
1515
path: path.join(basePath, "dist"),
16-
filename: "bundle.js"
16+
filename: "bundle.js",
1717
},
1818
devtool: "source-map",
1919
devServer: {
2020
contentBase: "./dist", // Content base
2121
inline: true, // Enable watch and live reload
2222
host: "localhost",
2323
port: 8080,
24-
stats: "errors-only"
24+
stats: "errors-only",
2525
},
2626
module: {
2727
rules: [
@@ -31,32 +31,33 @@ module.exports = {
3131
loader: "awesome-typescript-loader",
3232
options: {
3333
useBabel: true,
34-
babelCore: "@babel/core" // needed for Babel v7
35-
}
34+
babelCore: "@babel/core", // needed for Babel v7
35+
},
3636
},
3737
{
3838
test: /\.css$/,
39-
use: [MiniCssExtractPlugin.loader, "css-loader"]
39+
use: [MiniCssExtractPlugin.loader, "css-loader"],
4040
},
4141
{
4242
test: /\.(png|jpg|gif|svg)$/,
4343
loader: "file-loader",
4444
options: {
45-
name: "assets/img/[name].[ext]?[hash]"
46-
}
47-
}
48-
]
45+
name: "assets/img/[name].[ext]?[hash]",
46+
esModule: false,
47+
},
48+
},
49+
],
4950
},
5051
plugins: [
5152
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
5253
new HtmlWebpackPlugin({
5354
filename: "index.html", //Name of file in ./dist/
5455
template: "index.html", //Name of template in ./src
55-
hash: true
56+
hash: true,
5657
}),
5758
new MiniCssExtractPlugin({
5859
filename: "[name].css",
59-
chunkFilename: "[id].css"
60-
})
61-
]
60+
chunkFilename: "[id].css",
61+
}),
62+
],
6263
};

‎hooks/01_HelloReact/package.json

Copy file name to clipboardExpand all lines: hooks/01_HelloReact/package.json
+19-19Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@
1515
"author": "Braulio Diez Botella",
1616
"license": "MIT",
1717
"devDependencies": {
18-
"@babel/cli": "^7.2.3",
19-
"@babel/core": "^7.2.2",
20-
"@babel/polyfill": "^7.2.5",
21-
"@babel/preset-env": "^7.3.1",
22-
"@types/react": "^16.8.3",
23-
"@types/react-dom": "^16.8.1",
18+
"@babel/cli": "^7.10.5",
19+
"@babel/core": "^7.10.5",
20+
"@babel/polyfill": "^7.10.4",
21+
"@babel/preset-env": "^7.10.4",
22+
"@types/react": "^16.9.43",
23+
"@types/react-dom": "^16.9.8",
2424
"awesome-typescript-loader": "^5.2.1",
25-
"babel-loader": "^8.0.5",
26-
"css-loader": "^2.1.0",
27-
"file-loader": "^3.0.1",
28-
"html-webpack-plugin": "^3.2.0",
29-
"mini-css-extract-plugin": "^0.5.0",
30-
"style-loader": "^0.23.1",
31-
"typescript": "^3.3.3",
32-
"url-loader": "^1.1.2",
33-
"webpack": "^4.29.3",
34-
"webpack-cli": "^3.2.3",
35-
"webpack-dev-server": "^3.1.14"
25+
"babel-loader": "^8.1.0",
26+
"css-loader": "^3.6.0",
27+
"file-loader": "^6.0.0",
28+
"html-webpack-plugin": "^4.3.0",
29+
"mini-css-extract-plugin": "^0.9.0",
30+
"style-loader": "^1.2.1",
31+
"typescript": "^3.9.7",
32+
"url-loader": "^4.1.0",
33+
"webpack": "^4.43.0",
34+
"webpack-cli": "^3.3.12",
35+
"webpack-dev-server": "^3.11.0"
3636
},
3737
"dependencies": {
38-
"react": "^16.8.2",
39-
"react-dom": "^16.8.2"
38+
"react": "^16.13.1",
39+
"react-dom": "^16.13.1"
4040
}
4141
}

‎hooks/01_HelloReact/webpack.config.js

Copy file name to clipboard
+20-19Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
var HtmlWebpackPlugin = require("html-webpack-plugin");
2-
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
3-
var webpack = require("webpack");
4-
var path = require("path");
1+
const HtmlWebpackPlugin = require("html-webpack-plugin");
2+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3+
const webpack = require("webpack");
4+
const path = require("path");
55

6-
var basePath = __dirname;
6+
const basePath = __dirname;
77

88
module.exports = {
99
context: path.join(basePath, "src"),
1010
resolve: {
11-
extensions: [".js", ".ts", ".tsx"]
11+
extensions: [".js", ".ts", ".tsx"],
1212
},
1313
entry: ["@babel/polyfill", "./index.tsx"],
1414
output: {
1515
path: path.join(basePath, "dist"),
16-
filename: "bundle.js"
16+
filename: "bundle.js",
1717
},
1818
devtool: "source-map",
1919
devServer: {
2020
contentBase: "./dist", // Content base
2121
inline: true, // Enable watch and live reload
2222
host: "localhost",
2323
port: 8080,
24-
stats: "errors-only"
24+
stats: "errors-only",
2525
},
2626
module: {
2727
rules: [
@@ -31,32 +31,33 @@ module.exports = {
3131
loader: "awesome-typescript-loader",
3232
options: {
3333
useBabel: true,
34-
babelCore: "@babel/core" // needed for Babel v7
35-
}
34+
babelCore: "@babel/core", // needed for Babel v7
35+
},
3636
},
3737
{
3838
test: /\.css$/,
39-
use: [MiniCssExtractPlugin.loader, "css-loader"]
39+
use: [MiniCssExtractPlugin.loader, "css-loader"],
4040
},
4141
{
4242
test: /\.(png|jpg|gif|svg)$/,
4343
loader: "file-loader",
4444
options: {
45-
name: "assets/img/[name].[ext]?[hash]"
46-
}
47-
}
48-
]
45+
name: "assets/img/[name].[ext]?[hash]",
46+
esModule: false,
47+
},
48+
},
49+
],
4950
},
5051
plugins: [
5152
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
5253
new HtmlWebpackPlugin({
5354
filename: "index.html", //Name of file in ./dist/
5455
template: "index.html", //Name of template in ./src
55-
hash: true
56+
hash: true,
5657
}),
5758
new MiniCssExtractPlugin({
5859
filename: "[name].css",
59-
chunkFilename: "[id].css"
60-
})
61-
]
60+
chunkFilename: "[id].css",
61+
}),
62+
],
6263
};

‎hooks/02_Properties/package.json

Copy file name to clipboardExpand all lines: hooks/02_Properties/package.json
+19-19Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@
1515
"author": "Braulio Diez Botella",
1616
"license": "MIT",
1717
"devDependencies": {
18-
"@babel/cli": "^7.2.3",
19-
"@babel/core": "^7.2.2",
20-
"@babel/polyfill": "^7.2.5",
21-
"@babel/preset-env": "^7.3.1",
22-
"@types/react": "^16.8.3",
23-
"@types/react-dom": "^16.8.1",
18+
"@babel/cli": "^7.10.5",
19+
"@babel/core": "^7.10.5",
20+
"@babel/polyfill": "^7.10.4",
21+
"@babel/preset-env": "^7.10.4",
22+
"@types/react": "^16.9.43",
23+
"@types/react-dom": "^16.9.8",
2424
"awesome-typescript-loader": "^5.2.1",
25-
"babel-loader": "^8.0.5",
26-
"css-loader": "^2.1.0",
27-
"file-loader": "^3.0.1",
28-
"html-webpack-plugin": "^3.2.0",
29-
"mini-css-extract-plugin": "^0.5.0",
30-
"style-loader": "^0.23.1",
31-
"typescript": "^3.3.3",
32-
"url-loader": "^1.1.2",
33-
"webpack": "^4.29.3",
34-
"webpack-cli": "^3.2.3",
35-
"webpack-dev-server": "^3.1.14"
25+
"babel-loader": "^8.1.0",
26+
"css-loader": "^3.6.0",
27+
"file-loader": "^6.0.0",
28+
"html-webpack-plugin": "^4.3.0",
29+
"mini-css-extract-plugin": "^0.9.0",
30+
"style-loader": "^1.2.1",
31+
"typescript": "^3.9.7",
32+
"url-loader": "^4.1.0",
33+
"webpack": "^4.43.0",
34+
"webpack-cli": "^3.3.12",
35+
"webpack-dev-server": "^3.11.0"
3636
},
3737
"dependencies": {
38-
"react": "^16.8.2",
39-
"react-dom": "^16.8.2"
38+
"react": "^16.13.1",
39+
"react-dom": "^16.13.1"
4040
}
4141
}

‎hooks/02_Properties/src/hello.tsx

Copy file name to clipboardExpand all lines: hooks/02_Properties/src/hello.tsx
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ interface Props {
44
userName: string;
55
}
66

7-
export const HelloComponent = (props: Props) => (
8-
<h2>Hello user: {props.userName} !</h2>
9-
);
7+
export const HelloComponent: React.FC<Props> = (props) => (
8+
<h2>Hello user: {props.userName} !</h2>
9+
);

‎hooks/02_Properties/webpack.config.js

Copy file name to clipboard
+20-19Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
var HtmlWebpackPlugin = require("html-webpack-plugin");
2-
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
3-
var webpack = require("webpack");
4-
var path = require("path");
1+
const HtmlWebpackPlugin = require("html-webpack-plugin");
2+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3+
const webpack = require("webpack");
4+
const path = require("path");
55

6-
var basePath = __dirname;
6+
const basePath = __dirname;
77

88
module.exports = {
99
context: path.join(basePath, "src"),
1010
resolve: {
11-
extensions: [".js", ".ts", ".tsx"]
11+
extensions: [".js", ".ts", ".tsx"],
1212
},
1313
entry: ["@babel/polyfill", "./index.tsx"],
1414
output: {
1515
path: path.join(basePath, "dist"),
16-
filename: "bundle.js"
16+
filename: "bundle.js",
1717
},
1818
devtool: "source-map",
1919
devServer: {
2020
contentBase: "./dist", // Content base
2121
inline: true, // Enable watch and live reload
2222
host: "localhost",
2323
port: 8080,
24-
stats: "errors-only"
24+
stats: "errors-only",
2525
},
2626
module: {
2727
rules: [
@@ -31,32 +31,33 @@ module.exports = {
3131
loader: "awesome-typescript-loader",
3232
options: {
3333
useBabel: true,
34-
babelCore: "@babel/core" // needed for Babel v7
35-
}
34+
babelCore: "@babel/core", // needed for Babel v7
35+
},
3636
},
3737
{
3838
test: /\.css$/,
39-
use: [MiniCssExtractPlugin.loader, "css-loader"]
39+
use: [MiniCssExtractPlugin.loader, "css-loader"],
4040
},
4141
{
4242
test: /\.(png|jpg|gif|svg)$/,
4343
loader: "file-loader",
4444
options: {
45-
name: "assets/img/[name].[ext]?[hash]"
46-
}
47-
}
48-
]
45+
name: "assets/img/[name].[ext]?[hash]",
46+
esModule: false,
47+
},
48+
},
49+
],
4950
},
5051
plugins: [
5152
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
5253
new HtmlWebpackPlugin({
5354
filename: "index.html", //Name of file in ./dist/
5455
template: "index.html", //Name of template in ./src
55-
hash: true
56+
hash: true,
5657
}),
5758
new MiniCssExtractPlugin({
5859
filename: "[name].css",
59-
chunkFilename: "[id].css"
60-
})
61-
]
60+
chunkFilename: "[id].css",
61+
}),
62+
],
6263
};

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.