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
<html> | |
<head> | |
<title>Tic Tac Toe</title> | |
<link rel="stylesheet" type="text/css" href="./style.css" /> | |
</head> | |
<body> | |
<div id="Board"></div> | |
</body> | |
<script src="./script.js"></script> | |
</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
/* | |
* | |
** | |
*** | |
**** | |
***** | |
*/ |
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
function isString(val) { | |
return typeof val === 'string'; | |
} | |
function isNumber(val) { | |
return typeof val === 'number'; | |
} | |
module.exports = { | |
isString, |
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
{ | |
"name": "library-like-lodash-for-article", | |
"version": "1.0.0", | |
"description": "My custom library for article.", | |
"main": "index.js", | |
"dependencies": {}, | |
"devDependencies": {}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, |
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
function isString(val) { | |
return typeof val === 'string'; | |
} | |
module.exports = { | |
isString, | |
}; |
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
{ | |
"name": "react-application", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "webpack-dev-server --open --config webpack.dev.js", | |
"build": "webpack --config webpack.prod.js" | |
}, | |
"keywords": [], |
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
Show hidden characters
{ | |
"presets":[ "env", "react" ] | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Setup React App - Organizing React Application Part 1</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
</body> | |
</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
import React from 'react'; | |
import { render } from 'react-dom'; | |
const App = () => <h1>Hello World</h1>; | |
render(<App />, document.getElementById('root')); |
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
const webpack = require('webpack'); | |
const merge = require('webpack-merge'); | |
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | |
const common = require('./webpack.common.js'); | |
module.exports = merge(common, { | |
mode: 'production', | |
plugins: [ | |
new webpack.SourceMapDevToolPlugin({ | |
filename: '[name].js.map', |