Skip to content

Commit

Permalink
implemented storage layer
Browse files Browse the repository at this point in the history
  • Loading branch information
YZhenY committed Jun 19, 2020
1 parent 978a808 commit f41b920
Show file tree
Hide file tree
Showing 22 changed files with 1,358 additions and 674 deletions.
6 changes: 5 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["@babel/env"],
"plugins": ["@babel/plugin-proposal-object-rest-spread", ["@babel/transform-runtime", { "corejs": { "version": 3 } }]]
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
["@babel/transform-runtime", { "corejs": { "version": 3 } }]
]
}
22 changes: 22 additions & 0 deletions .eslintignore
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*
examples/
96 changes: 96 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"standard",
"eslint:recommended",
"plugin:prettier/recommended",
"prettier/babel",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:flowtype/recommended",
"plugin:promise/recommended",
"airbnb-base",
"prettier"
],
"plugins": ["prettier", "babel", "standard", "promise", "import", "flowtype", "standard", "simple-import-sort", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 9,
"project": "./tsconfig.json"
},
"rules": {
"camelcase": 0,
"no-useless-constructor": 0,
"@typescript-eslint/no-useless-constructor": 2,
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"ts": "never"
}
],
"no-restricted-syntax": 0,
"simple-import-sort/sort": "error",
"operator-linebreak": 0,
"object-curly-newline": 0,
"no-underscore-dangle": 0,
"max-len": [
2,
{
"code": 150
}
],
"import/prefer-default-export": 0,
"no-nested-ternary": 0,
"no-confusing-arrow": 0,
"linebreak-style": 0,
"no-unused-vars": [2, { "args": "after-used", "argsIgnorePattern": "_" }],
"no-param-reassign": [
"error",
{
"props": false
}
],
"prettier/prettier": [
"error",
{
"singleQuote": false,
"printWidth": 150,
"semi": true
}
]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".json", ".vue"]
}
}
},
"overrides": [
{
"files": ["examples"],
"parser": "vue-eslint-parser"
}
],
"env": {
"es6": true,
"browser": true,
"node": true,
"serviceworker": true
},
"globals": {
"document": true,
"fetch": true,
"jest": true,
"it": true,
"beforeEach": true,
"afterEach": true,
"describe": true,
"expect": true
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ dist

# TernJS port file
.tern-port

toruslabs-torus-direct-web-sdk-*
bundle.min.js
types2/
112 changes: 112 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port


examples/
toruslabs-torus-direct-web-sdk-*
ssl/
src/
scripts/
.eslintrc.json
.eslintignore
.prettierignore
.prettierrc.yaml
.babelrc
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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*
4 changes: 4 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .prettierrc or .prettierrc.yaml
printWidth: 150
singleQuote: false
semi: true
92 changes: 92 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"eslint.options": {
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"standard",
"eslint:recommended",
"plugin:prettier/recommended",
"prettier/babel",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:flowtype/recommended",
"plugin:promise/recommended",
"airbnb-base",
"prettier"
],
"plugins": ["prettier", "babel", "standard", "promise", "import", "flowtype", "standard", "simple-import-sort", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 9
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".json", ".vue"]
}
}
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/camelcase": "off"
}
}
],
"rules": {
"camelcase": 0,
"no-useless-constructor": 0,
"@typescript-eslint/no-useless-constructor": 2,
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"ts": "never"
}
],
"no-restricted-syntax": 0,
"simple-import-sort/sort": "error",
"operator-linebreak": 0,
"object-curly-newline": 0,
"no-underscore-dangle": 0,
"max-len": [
2,
{
"code": 150
}
],
"import/prefer-default-export": 0,
"no-nested-ternary": 0,
"no-confusing-arrow": 0,
"linebreak-style": 0,
"no-unused-vars": [2, { "args": "after-used", "argsIgnorePattern": "_" }],
"no-param-reassign": [
"error",
{
"props": false
}
],
"prettier/prettier": [
"error",
{
"singleQuote": false,
"printWidth": 150,
"semi": true
}
]
},
"env": {
"es6": true,
"browser": true,
"node": true,
"serviceworker": true
}
}
}
Loading

0 comments on commit f41b920

Please sign in to comment.