Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas carballo committed Nov 29, 2022
0 parents commit 4f99271
Show file tree
Hide file tree
Showing 1,563 changed files with 127,218 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .babel-plugin-macrosrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
styledComponents: {
displayName: process.env.NODE_ENV !== 'production',
},
};
43 changes: 43 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = api => {
// This caches the Babel config for faster rebuilds
api.cache.using(() => process.env.NODE_ENV);

return {
presets: [['babel-preset-react-app', { runtime: 'automatic' }]],
plugins: [
['macros'],
['@babel/plugin-transform-runtime'],
[
'babel-plugin-styled-components',
{
ssr: false,
minify: true,
transpileTemplateLiterals: true,
pure: false,
displayName: false,
fileName: false,
preprocess: false,
},
],
[
'module-resolver',
{
alias: {
theme: './src/theme',
components: './src/components',
config: './src/config',
utils: './src/utils',
assets: './src/assets',
store: './src/store',
routes: './src/routes',
contexts: './src/contexts',
hooks: './src/hooks',
constants: './src/constants',
app: './src/app',
pages: './src/app/pages',
},
},
],
],
};
};
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const fs = require('fs');
const path = require('path');

const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);

module.exports = {
extends: ['react-app', 'prettier', 'plugin:react-hooks/recommended'],
plugins: ['prettier'],
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'array-callback-return': 'error',
'no-template-curly-in-string': 'off',
'prettier/prettier': ['error', prettierOptions],
'no-restricted-globals': 'off',
},
globals: {
__COMMIT__: true,
},
overrides: [
{
files: ['**/*.ts?(x)'],
rules: { 'prettier/prettier': ['warn', prettierOptions] },
},
],
};
201 changes: 201 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes

## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################

# Auto detect
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto

# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text
*.css text
*.htm text diff=html
*.html text diff=html
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.ls text
*.map text -diff
*.od text
*.onlydata text
*.php text diff=php
*.pl text
*.ps1 text eol=crlf
*.py text diff=python
*.rb text diff=ruby
*.sass text
*.scm text
*.scss text diff=css
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text diff=html

# Docker
Dockerfile text

# Documentation
*.ipynb text
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

# Templates
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text
*.vue text

# Configs
*.cnf text
*.conf text
*.config text
.editorconfig text
.env text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text -diff
package-lock.json text -diff
*.toml text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

# Heroku
Procfile text

# Graphics
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.gifv binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary

# Audio
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

# Video
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary

# Archives
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

# Fonts
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

# Executables
*.exe binary
*.pyc binary

# RC files (like .babelrc or .eslintrc)
*.*rc text

# Ignore files (like .npmignore or .gitignore)
*.*ignore text
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# review when someone opens a pull request.
# @matteo-ma-stealth
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# [FEATURE | FIX | UT] JIRA TICKET DEV2 - [ticket name](ticket url)

## Description

-

## Screenshots
28 changes: 28 additions & 0 deletions .github/workflows/deploy-chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Workflow name
name: 'Run all tests'

# Event for the workflow
on: push

# List of jobs
jobs:
test:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- name: Clone repository
uses: actions/checkout@v1
- name: Install dependencies
run: yarn
- name: Check for linter errors
run: yarn lint
- name: Run tests
run: yarn test
# - name: Deploy on Chromatic
# uses: chromaui/action@v1
# # Options required for Chromatic's GitHub Action
# with:
# #👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/en/deploy/ to obtain it
# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# token: ${{ secrets.CHROMATIC_GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/prod-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: v2-deploy-s3-production

on:
push:
paths:
- '**'
branches:
- production

jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
REACT_APP_QUEUE_FAUCET: ${{ secrets.REACT_APP_QUEUE_FAUCET }}
REACT_APP_COVALENT_API_KEY: ${{ secrets.REACT_APP_COVALENT_API_KEY }}
REACT_APP_FAUCET_ACCESS_KEY: ${{ secrets.REACT_APP_FAUCET_ACCESS_KEY }}
REACT_APP_FAUCET_SECRET_KEY: ${{ secrets.REACT_APP_FAUCET_SECRET_KEY }}
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: yarn

- name: Build
run: npm run build

- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: build
bucket: ${{ secrets.S3_V2_PROD_BUCKET_NAME }}
bucket-region: ${{ secrets.AWS_REGION }}
invalidation: /
delete-removed: true
no-cache: true
private: true
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Don't check auto-generated stuff into git
coverage
build
cache
node_modules
spiritswap-stats.json

# misc
.DS_Store
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env
.env.development.local
.env.test.local
.env.production.local

# boilerplate internals
generated-cra-app
.cra-template-rb
template
.eslintcache

# jetbrains ide
.idea/

# jest
.cache/
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn checkTs
yarn lint-staged

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact = true
Loading

0 comments on commit 4f99271

Please sign in to comment.