Skip to content

Commit

Permalink
initial commit for mpc playground
Browse files Browse the repository at this point in the history
  • Loading branch information
hqjang-pepper committed Nov 22, 2023
1 parent 7d78e7e commit c319aca
Show file tree
Hide file tree
Showing 54 changed files with 32,197 additions and 0 deletions.
1 change: 1 addition & 0 deletions mpc-core-kit-web/mpc-react-playground/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_BACKEND_ENDPOINT=https://external-auth-backend.web3auth.io
25 changes: 25 additions & 0 deletions mpc-core-kit-web/mpc-react-playground/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

#production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
examples/
dist/
types/
**/*.d.ts
33 changes: 33 additions & 0 deletions mpc-core-kit-web/mpc-react-playground/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: ["@toruslabs/eslint-config-typescript"],
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
ecmaVersion: 11,
project: "./tsconfig.json",
},
ignorePatterns: ["*.config.js", "*.d.ts", ".eslintrc.js"],
env: {
es2020: true,
browser: true,
node: true,
mocha: true,
},
rules: {
"@typescript-eslint/no-explicit-any": 0,
"no-console": 0,
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
},
};
22 changes: 22 additions & 0 deletions mpc-core-kit-web/mpc-react-playground/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

#production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
/packages/*/types
5 changes: 5 additions & 0 deletions mpc-core-kit-web/mpc-react-playground/.prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# .prettierrc or .prettierrc.yaml
printWidth: 150
singleQuote: false
semi: true
trailingComma: es5
46 changes: 46 additions & 0 deletions mpc-core-kit-web/mpc-react-playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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:

### `npm 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.

### `npm 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.

### `npm run 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.

### `npm run 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/).
32 changes: 32 additions & 0 deletions mpc-core-kit-web/mpc-react-playground/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const webpack = require("webpack");

module.exports = function override(config) {
const fallback = config.resolve.fallback || {};
Object.assign(fallback, {
crypto: false,
stream: false,
assert: false,
http: false,
https: false,
os: false,
url: false,
zlib: false,
});
config.resolve.fallback = fallback;
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
]);
config.ignoreWarnings = [/Failed to parse source map/];
config.module.rules.push({
test: /\.(js|mjs|jsx)$/,
enforce: "pre",
loader: require.resolve("source-map-loader"),
resolve: {
fullySpecified: false,
},
});
return config;
};
Loading

0 comments on commit c319aca

Please sign in to comment.