Skip to content

Commit

Permalink
Add/remove skeleton files
Browse files Browse the repository at this point in the history
  • Loading branch information
abefernan committed Nov 18, 2020
1 parent 87c0d1e commit f3fe74b
Show file tree
Hide file tree
Showing 17 changed files with 935 additions and 203 deletions.
55 changes: 55 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
plugins: ["@typescript-eslint", "react", "simple-import-sort"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
rules: {
curly: ["warn", "multi-line", "consistent"],
"no-empty": "off",
"no-console": [
"warn",
{
allow: ["error", "info", "warn"],
},
],
"no-param-reassign": "warn",
"prefer-const": "warn",
"sort-imports": "off", // we use the simple-import-sort plugin instead
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
"simple-import-sort/sort": "warn",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
allowExpressions: true,
},
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
},
overrides: [
{
files: "**/*.js",
rules: {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
},
},
],
settings: {
react: {
version: "detect", // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
};
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# generated tailwind
/src/tailwind.output.css

# dependencies
/node_modules
/.pnp
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"trailingComma": "all",
"printWidth": 110
}
47 changes: 1 addition & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
# IBC Visualizer
31 changes: 27 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"name": "ibc-visualizer",
"version": "0.1.0",
"private": true,
"license": "Apache-2.0",
"dependencies": {
"@cosmjs/cosmwasm": "^0.24.0-alpha.6",
"@cosmjs/encoding": "^0.24.0-alpha.6",
"@cosmjs/launchpad": "^0.24.0-alpha.6",
"@cosmjs/math": "^0.24.0-alpha.6",
"@cosmjs/stargate": "^0.24.0-alpha.6",
"@cosmjs/tendermint-rpc": "^0.24.0-alpha.6",
"@cosmjs/utils": "^0.24.0-alpha.6",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
Expand All @@ -12,21 +20,25 @@
"@types/react-dom": "^16.9.8",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.0",
"tailwindcss": "^1.9.6",
"typescript": "^4.0.3",
"web-vitals": "^0.2.4"
},
"scripts": {
"prestart": "npm run build:tailwind",
"prestart:local": "npm run build:tailwind",
"start:local": "REACT_APP_LOCAL=true react-scripts start",
"start": "react-scripts start",
"build:tailwind": "tailwindcss build src/index.css -o src/tailwind.output.css",
"prebuild": "NODE_ENV=production npm run build:tailwind",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"extends": "react-app"
},
"browserslist": {
"production": [
Expand All @@ -39,5 +51,16 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/react-router-dom": "^5.1.6",
"@typescript-eslint/eslint-plugin": "^4.7.0",
"@typescript-eslint/parser": "^4.7.0",
"eslint": "^7.13.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-simple-import-sort": "^5.0.3",
"prettier": "^2.1.2"
}
}
38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

9 changes: 0 additions & 9 deletions src/App.test.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions src/App.tsx

This file was deleted.

16 changes: 16 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
interface AppConfig {
readonly rpcUrl: string;
}

const local: AppConfig = {
rpcUrl: "http://localhost:26657",
};

const coralnet: AppConfig = {
rpcUrl: "https://rpc.coralnet.cosmwasm.com",
};

// REACT_APP_LOCAL is set via `yarn start:local`
const isLocal = process.env.NODE_ENV !== "production" && !!process.env.REACT_APP_LOCAL;

export const config = isLocal ? local : coralnet;
25 changes: 17 additions & 8 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

*,
*::before,
*::after {
box-sizing: border-box;
}

body {
min-height: 100vh;
text-rendering: optimizeSpeed;
line-height: 1.5;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
background-color: #1f1f1f;
color: white;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
"Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
18 changes: 7 additions & 11 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import "./tailwind.output.css";

import React from "react";
import ReactDOM from "react-dom";

import { App } from "./App";

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
document.getElementById("root"),
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
7 changes: 0 additions & 7 deletions src/logo.svg

This file was deleted.

15 changes: 0 additions & 15 deletions src/reportWebVitals.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/setupTests.ts

This file was deleted.

6 changes: 6 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
purge: {
mode: "layers",
content: ["./src/**/*.tsx"],
},
};
16 changes: 5 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
"jsx": "react",
"noFallthroughCasesInSwitch": true
},
"include": [
"src"
]
"include": ["src"]
}
Loading

0 comments on commit f3fe74b

Please sign in to comment.