switched to yarn; add additional dependency

This commit is contained in:
Daniel 2019-11-14 11:02:10 -05:00
parent dd4e5b8aa3
commit ec77770ac1
7 changed files with 8097 additions and 11375 deletions

View File

@ -3,11 +3,11 @@ module.exports = exports = {
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended"
"plugin:react/recommended",
"plugin:flowtype/recommended"
],
"env": {
"browser": true,
"es6": true,
"node": true,
"amd": true
},
@ -18,7 +18,8 @@ module.exports = exports = {
"modules": true,
"jsx": true,
"experimentalObjectRestSpread": true,
"legacyDecorators": true
"legacyDecorators": true,
"objectLiteralComputedProperties": true
}
},
"rules": {
@ -48,6 +49,7 @@ module.exports = exports = {
"plugins": [
"react",
"import",
"react-hooks"
"react-hooks",
"flowtype"
]
}

View File

@ -1,16 +1,18 @@
## Dev Instructions
Have Nodejs ([node installation](https://nodejs.org/en/)) installed on your machine. Then navigate to the top level of the project in a run ``npm install``
### Setup Instructions
Have Nodejs ([node installation](https://nodejs.org/en/)) installed on your machine.
Install ([yarn](https://yarnpkg.com/lang/en/)) with ``npm install -g yarn``.
Then navigate to the top level of the project in a run ``yarn install``.
### Development Running
To run the website locally
```bash
npm start
yarn start
```
### Production Building
To have your changes reflected on the live website, you first need to build/bundle the javascript and css
```
npm run build
```bash
yarn build
```
Then pushing/merging these changes into master will update the website
Merging changes into master will update the website

View File

@ -1,55 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chaotic Backup</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Chaotic Backup">
<link rel="stylesheet" type="text/css" href="/src/css/legacy.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
<style>
html, body, div, span, a, p, ul, li, h1 {
margin: 0;
border: 0;
padding: 0;
}
a {
color: inherit;
text-decoration: inherit;
}
html, body { height: 100%; }
html { background-color:#494949; }
#root { min-height: 100%; }
body { overflow-x: hidden; }
</style>
<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
(function(l) {
if (l.search) {
var q = {};
l.search.slice(1).split('&').forEach(function(v) {
var a = v.split('=');
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
});
if (q.p !== undefined) {
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + (q.p || '') +
(q.q ? ('?' + q.q) : '') +
l.hash
);
}
}
}(window.location))
</script>
<!-- End Single Page Apps for GitHub Pages -->
</head>
<body>
<div id="root"></div>
<script src="/build/main.js"></script>
<script src="/build/vendor.js"></script>
</body>
</html>

11303
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,7 @@
"@material-ui/styles": "^4.5.0",
"@types/react": "^16.9.9",
"@types/react-dom": "^16.9.2",
"@types/react-router-dom": "^5.1.2",
"lokijs": "^1.5.7",
"mobx": "^5.13.1",
"mobx-react": "^5.4.4",
@ -43,8 +44,9 @@
"@babel/node": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-proposal-dynamic-import": "^7.7.0",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-computed-properties": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/polyfill": "^7.6.0",
"@babel/preset-env": "^7.6.2",
@ -52,11 +54,12 @@
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@babel/register": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@babel/runtime": "^7.7.1",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.5",
"css-loader": "^3.2.0",
"eslint": "^6.5.1",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-react": "^7.15.0",
"eslint-plugin-react-hooks": "^2.1.1",
@ -70,5 +73,17 @@
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.1"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

View File

@ -9,7 +9,7 @@ require('@babel/register');
const devMode = (process.env.NODE_ENV !== 'production' && process.argv.indexOf('-p') === -1);
const config = {
entry: ['@babel/polyfill', `./src/components/index.js`],
entry: ['@babel/polyfill', './src/components/index.js'],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
@ -18,7 +18,7 @@ const config = {
devServer: {
host: '0.0.0.0',
historyApiFallback: {
index: 'index.dev.html',
index: 'index.html',
},
},
@ -78,16 +78,16 @@ const config = {
options: {
presets: [
'@babel/typescript',
'@babel/preset-env',
"@babel/preset-env",
'@babel/preset-react',
'@babel/preset-flow',
],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-object-rest-spread',
['@babel/plugin-proposal-decorators', {legacy: true}],
['@babel/plugin-proposal-class-properties', {loose: true}],
'@babel/plugin-syntax-dynamic-import',
'@babel/proposal-object-rest-spread',
['@babel/plugin-transform-computed-properties', {loose: true}],
],
},
},

8061
yarn.lock Normal file

File diff suppressed because it is too large Load Diff