- Create a .gitignore file in the git repository if it does not contain one
touch .gitignore
2. Open up the .gitignore and add the following line to the file
node_modules 3. Remove the node_modules folder from the git repository
// polyfill for matchAll | |
function matchAllPolyfill(regexPattern, sourceString) { | |
let output = [] | |
let match | |
// make sure the pattern has the global flag | |
let regexPatternWithGlobal = RegExp(regexPattern, "g") | |
while (match = regexPatternWithGlobal.exec(sourceString)) { | |
delete match.input | |
output.push(match) | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> |