mirror of
https://github.com/usatiuk/EggbotWireless.git
synced 2025-10-26 16:57:48 +01:00
setup a web app
This commit is contained in:
12
App/.gitignore
vendored
Normal file
12
App/.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
.idea/
|
||||
node_modules/
|
||||
build/
|
||||
tmp/
|
||||
temp/
|
||||
dist/
|
||||
ormconfig.json
|
||||
ormconfig.test.json
|
||||
.env
|
||||
.cache
|
||||
.directory
|
||||
.history
|
||||
4
App/.prettierrc
Normal file
4
App/.prettierrc
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"trailingComma": "all",
|
||||
"tabWidth": 4
|
||||
}
|
||||
15
App/jest.config.js
Normal file
15
App/jest.config.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest/utils");
|
||||
const { compilerOptions } = require("./tsconfig");
|
||||
|
||||
module.exports = {
|
||||
preset: "ts-jest",
|
||||
moduleNameMapper: {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
||||
"<rootDir>/src/fileMock.ts",
|
||||
"\\.(css|less|scss)$": "<rootDir>/src/styleMock.ts",
|
||||
...pathsToModuleNameMapper(compilerOptions.paths, {
|
||||
prefix: "<rootDir>/",
|
||||
}),
|
||||
},
|
||||
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
|
||||
};
|
||||
10322
App/package-lock.json
generated
Normal file
10322
App/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
46
App/package.json
Normal file
46
App/package.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "eggbotapp",
|
||||
"scripts": {
|
||||
"start": "parcel src/index.html",
|
||||
"build": "parcel build src/index.html",
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/autoprefixer": "^9.5.0",
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/enzyme-adapter-react-16": "^1.0.5",
|
||||
"@types/jest": "^24.0.15",
|
||||
"@types/node-sass": "^4.11.0",
|
||||
"@types/parcel-bundler": "^1.12.0",
|
||||
"@types/prettier": "^1.18.1",
|
||||
"@types/react": "^16.8.23",
|
||||
"@types/react-dom": "^16.8.4",
|
||||
"@types/sass": "^1.16.0",
|
||||
"autoprefixer": "^9.6.1",
|
||||
"enzyme": "^3.10.0",
|
||||
"enzyme-adapter-react-16": "^1.14.0",
|
||||
"jest": "^24.8.0",
|
||||
"parcel-bundler": "^1.12.3",
|
||||
"postcss-modules": "^1.4.1",
|
||||
"prettier": "^1.18.2",
|
||||
"redux-devtools-extension": "^2.13.8",
|
||||
"sass": "^1.22.7",
|
||||
"ts-jest": "^24.0.2",
|
||||
"tsconfig-paths": "^3.8.0",
|
||||
"tslint": "^5.18.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-no-unused-expression-chai": "^0.1.4",
|
||||
"tslint-plugin-prettier": "^2.0.1",
|
||||
"typescript": "^3.5.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"normalize.css": "^8.0.1",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
11
App/src/App.test.tsx
Normal file
11
App/src/App.test.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { shallow } from "enzyme";
|
||||
import * as React from "react";
|
||||
|
||||
import { App } from "~App";
|
||||
|
||||
describe("<DocumentsList />", () => {
|
||||
it("should say hello", () => {
|
||||
const wrapper = shallow(<App />);
|
||||
expect(wrapper.text()).toEqual("Hello");
|
||||
});
|
||||
});
|
||||
7
App/src/App.tsx
Normal file
7
App/src/App.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
export function AppComponent() {
|
||||
return <div>Hello</div>;
|
||||
}
|
||||
|
||||
export const App = AppComponent;
|
||||
15
App/src/index.html
Normal file
15
App/src/index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!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>Writer</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="body">
|
||||
|
||||
</div>
|
||||
<script src="./index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
7
App/src/index.tsx
Normal file
7
App/src/index.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import "normalize.css/normalize.css";
|
||||
|
||||
import * as React from "react";
|
||||
import { render } from "react-dom";
|
||||
import { App } from "~App";
|
||||
|
||||
render(<App />, document.getElementById("body"));
|
||||
4
App/src/setupTests.ts
Normal file
4
App/src/setupTests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as Enzyme from "enzyme";
|
||||
import * as Adapter from "enzyme-adapter-react-16";
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
1
App/src/styleMock.ts
Normal file
1
App/src/styleMock.ts
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = {};
|
||||
24
App/tsconfig.json
Normal file
24
App/tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"es2017",
|
||||
"dom"
|
||||
],
|
||||
"jsx": "react",
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "./dist",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"noImplicitAny": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"~*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
16
App/tslint.json
Normal file
16
App/tslint.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": [
|
||||
"tslint-plugin-prettier"
|
||||
],
|
||||
"rules": {
|
||||
"prettier": true,
|
||||
"no-console": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"no-implicit-dependencies": false,
|
||||
"no-submodule-imports": false,
|
||||
"no-this-assignment": false,
|
||||
"max-classes-per-file": false,
|
||||
"jsx-no-lambda": false,
|
||||
"linebreak-style": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user