Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit f30734f

Browse files
Merge pull request #14 from thefringeninja/neuro-atypical-script
Typescript!
2 parents 46ca268 + 8767b0c commit f30734f

File tree

7 files changed

+2881
-3945
lines changed

7 files changed

+2881
-3945
lines changed

package.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,30 @@
55
"repository": "https://github.com/thefringeninja/sql-stream-store-browser.git",
66
"scripts": {
77
"analyze": "source-map-explorer build/static/js/main.*",
8-
"start": "react-scripts start",
9-
"build": "prettier --list-different \"src/**/*.js\" && react-scripts build",
10-
"eject": "react-scripts eject",
11-
"format": "prettier --write \"src/**/*.js\""
8+
"start": "react-scripts-ts start",
9+
"build": "prettier --list-different \"src/**/*.js\" \"src/**/*.ts\" \"src/**/*.tsx\" && react-scripts-ts build",
10+
"eject": "react-scripts-ts eject",
11+
"format": "prettier --write \"src/**/*.js\" \"src/**/*.ts\" \"src/**/*.tsx\""
1212
},
13-
"main": "src/index.js",
13+
"main": "src/index.tsx",
1414
"private": false,
1515
"devDependencies": {
16+
"@types/classnames": "^2.2.6",
17+
"@types/history": "^4.7.2",
18+
"@types/jss": "^9.5.7",
19+
"@types/prettier": "^1.13.2",
20+
"@types/react": "^16.4.18",
21+
"@types/react-dom": "^16.0.9",
22+
"@types/react-tap-event-plugin": "^0.0.30",
23+
"@types/react-transition-group": "^2.0.14",
24+
"@types/uuid": "^3.4.4",
1625
"babel-plugin-module-resolver": "3.1.1",
1726
"prettier": "1.14.2",
18-
"source-map-explorer": "1.6.0"
27+
"react-scripts-ts": "3.1.0",
28+
"source-map-explorer": "1.6.0",
29+
"tslint-config-prettier": "1.15.0",
30+
"typescript": "3.1.3",
31+
"typesync": "0.4.0"
1932
},
2033
"dependencies": {
2134
"@material-ui/core": "3.2.1",
@@ -29,7 +42,6 @@
2942
"react-inspector": "2.3.0",
3043
"react-remarkable": "1.1.3",
3144
"react-schema-form": "0.5.0",
32-
"react-scripts": "2.0.5",
3345
"react-tap-event-plugin": "3.0.2",
3446
"rxjs": "5.4.3",
3547
"uri-js": "4.2.2",

src/index.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import SqlStreamStoreBrowser from './SqlStreamStoreBrowser';
4+
5+
const anyWindow = window as any;
6+
anyWindow.SqlStreamStoreBrowser = SqlStreamStoreBrowser;
7+
anyWindow.ReactDOM = ReactDOM;
8+
anyWindow.React = React;
9+
10+
export default SqlStreamStoreBrowser;

tsconfig.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "./src",
4+
"outDir": "build/dist",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"lib": [
8+
"dom",
9+
"es6",
10+
"esnext.array"
11+
],
12+
"sourceMap": true,
13+
"allowJs": true,
14+
"jsx": "react",
15+
"moduleResolution": "node",
16+
"rootDir": "src",
17+
"noImplicitReturns": true,
18+
"noImplicitThis": true,
19+
"noImplicitAny": true,
20+
"strictNullChecks": true,
21+
"alwaysStrict": true,
22+
"allowSyntheticDefaultImports": true,
23+
"esModuleInterop": true,
24+
},
25+
"exclude": [
26+
"node_modules",
27+
"build",
28+
"scripts",
29+
"webpack",
30+
],
31+
"types": [
32+
"typePatches"
33+
]
34+
}

tsconfig.prod.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./tsconfig.json"
3+
}

tslint.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": [
3+
"tslint:latest",
4+
"tslint-config-prettier"
5+
],
6+
"defaultSeverity": "warning",
7+
"linterOptions": {
8+
"exclude": [
9+
"config/**/*.js",
10+
"node_modules/**/*.ts"
11+
]
12+
}
13+
}

0 commit comments

Comments
 (0)