build(react-scripts): move from react-scripts-ts to react-scripts

the latter now supports typescript natively.
This commit is contained in:
Tao Bror Bojlén 2019-04-17 15:44:23 +01:00
parent 5356b58d83
commit 8d00ba9372
No known key found for this signature in database
GPG Key ID: C6EC7AAB905F9E6F
8 changed files with 4347 additions and 2951 deletions

View File

@ -21,7 +21,7 @@ from scraper.management.commands._util import require_lock, InvalidResponseExcep
# TODO: use the /api/v1/server/followers and /api/v1/server/following endpoints in peertube instances
SEED = 'p.a3.pm'
SEED = 'mastodon.social'
TIMEOUT = 20 # seconds
NUM_THREADS = 16 # roughly 40MB each
PERSONAL_INSTANCE_THRESHOLD = 10 # instances with < this many users won't be crawled

View File

@ -3,13 +3,13 @@
"version": "0.1.0",
"private": true,
"scripts": {
"start": "NODE_ENV=development react-scripts-ts start",
"build": "react-scripts-ts build",
"start": "NODE_ENV=development react-scripts start",
"build": "react-scripts build",
"lint": "tslint -p tsconfig.json -c tslint.json \"src/**/*.{ts,tsx}\"",
"lint:fix": "yarn lint --fix",
"pretty": "prettier --write \"src/**/*.{ts,tsx}\"",
"test": "yarn lint && react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
"test": "yarn lint && react-scripts test",
"eject": "react-scripts eject"
},
"husky": {
"hooks": {
@ -39,7 +39,7 @@
"react-dom": "^16.4.2",
"react-redux": "^7.0.2",
"react-router-dom": "^5.0.0",
"react-scripts-ts": "3.1.0",
"react-scripts": "^2.1.8",
"react-sigma": "^1.2.30",
"react-virtualized": "^9.20.1",
"redux": "^4.0.0",
@ -53,16 +53,23 @@
"@types/jest": "^24.0.11",
"@types/lodash": "^4.14.116",
"@types/node": "^11.13.4",
"@types/react": "^16.4.12",
"@types/react-dom": "^16.0.7",
"@types/react": "^16.8.13",
"@types/react-dom": "^16.8.4",
"@types/react-redux": "^7.0.6",
"@types/react-router-dom": "^4.3.2",
"@types/react-virtualized": "^9.18.7",
"@types/sanitize-html": "^1.18.0",
"@types/sanitize-html": "^1.18.3",
"@types/styled-components": "4.1.8",
"husky": "^1.3.1",
"lint-staged": "^8.1.5",
"tslint": "^5.16.0",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.0.1"
}
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

View File

@ -1,6 +1,6 @@
import * as React from 'react';
import { connect } from 'react-redux';
import { Sigma, SigmaEnableWebGL, Filter, ForceAtlas2 } from 'react-sigma';
import { Sigma, Filter, ForceAtlas2 } from 'react-sigma';
import { selectAndLoadInstance } from '../redux/actions';
import { ErrorState } from './ErrorState';

View File

@ -1,9 +1,9 @@
import { orderBy } from "lodash";
import * as moment from "moment";
import moment from "moment";
import * as React from "react";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import * as sanitize from "sanitize-html";
import sanitize from "sanitize-html";
import {
AnchorButton,

1
frontend/src/react-app-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="react-scripts" />

View File

@ -44,7 +44,7 @@ const data = (state: IDataState = initialDataState, action: IAction) => {
}
};
const initialCurrentInstanceState = {
const initialCurrentInstanceState: ICurrentInstanceState = {
currentInstanceDetails: null,
currentInstanceName: null,
error: false,

View File

@ -1,11 +1,13 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": false,
"baseUrl": ".",
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["es6", "dom"],
"jsx": "preserve",
"lib": [
"esnext",
"dom",
],
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": true,
@ -17,10 +19,19 @@
"sourceMap": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es5"
"target": "es5",
"skipLibCheck": true,
"esModuleInterop": true,
"strict": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
},
"exclude": [
"node_modules",
"build"
],
"include": [
"src"
]
}

File diff suppressed because it is too large Load Diff