Use CRA to get you going.
$ npx create-react-app component-library
You're going to want styleguidist. Follow the instructions here.
Add .babelrc file to the root of your library.
// basic instance of store in redux | |
const createStore = reducer => { | |
let state; | |
let listeners = []; | |
const getState = () => state; | |
const dispatch = action => { | |
state = reducer(state, action); | |
listeners.forEach(listener => listener()); |
Use CRA to get you going.
$ npx create-react-app component-library
You're going to want styleguidist. Follow the instructions here.
Add .babelrc file to the root of your library.
Adopted from (webaim)[https://webaim.org/intro/].
More good resources: (google accessibility)[https://developers.google.com/web/fundamentals/accessibility/], (w3)[https://www.w3.org/WAI/intro/accessibility.php]
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<link rel="stylesheet" href="style.css" /> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"> | |
</head> |
function ackermann(m, n) { | |
var ans; | |
if (m === 0) { | |
ans = n + 1; | |
} else if (n === 0) { | |
ans = ackermann(m - 1, 1); | |
} else { | |
ans = ackermann(m - 1, ackermann(m, n - 1)); | |
} | |
return ans; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script src="http://oklahoma-bookdirect.com/widgets/search_widget.js.php?id=334" type="text/javascript" language="javascript"></script> | |
</body> | |
</html> |
<?php | |
// ... An alternative to a multisite config while using the same codebase. | |
// ... In my use case: parent and child theme with two different domains. Multisite not wanted. (although it would make life easier) | |
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
$domain_one = preg_match( '/domainone\.com/', $_SERVER['SERVER_NAME'] ); | |
$domain_two = preg_match('/domaintwo\.com/', $_SERVER['SERVER_NAME'] ); | |
if ( $domain_one ) { | |
define('DB_NAME', 'database_one'); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
body { | |
margin: 0; | |
} | |
svg { |