Skip to content

Commit

Permalink
torus scripts and esm build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshuchawla009 committed Nov 10, 2021
1 parent 98540ad commit a82d47e
Show file tree
Hide file tree
Showing 15 changed files with 1,063 additions and 1,660 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

100 changes: 4 additions & 96 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,14 @@
{
"extends": [
"airbnb-typescript/base",
"problems",
"plugin:@typescript-eslint/recommended",
"standard",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:promise/recommended",
"plugin:mocha/recommended",
"prettier"
],
"plugins": ["prettier", "promise", "import", "simple-import-sort", "mocha", "@typescript-eslint", "eslint-plugin-tsdoc"],
"root": true,
"extends": ["@toruslabs/eslint-config-typescript"],
"parser": "@typescript-eslint/parser",
"ignorePatterns": "*.config.js",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 11,
"project": "./tsconfig.json"
},
"ignorePatterns": "*.config.js",
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "typeLike",
"format": ["camelCase", "UPPER_CASE", "PascalCase"]
}
],
"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/imports": "error",
"simple-import-sort/exports": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "after-used", "argsIgnorePattern": "_" }],
"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-param-reassign": [
"error",
{
"props": false
}
],
"tsdoc/syntax": "warn",
"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
"camelcase": 0
}
}
99 changes: 1 addition & 98 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,98 +1 @@
{
"eslint.options": {
"extends": [
"airbnb-typescript/base",
"problems",
"plugin:@typescript-eslint/recommended",
"standard",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:promise/recommended",
"plugin:mocha/recommended",
"prettier"
],
"plugins": ["prettier", "promise", "import", "simple-import-sort", "mocha", "@typescript-eslint", "eslint-plugin-tsdoc"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 11,
"project": "./tsconfig.json"
},
"ignorePatterns": "*.config.js",
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "typeLike",
"format": ["camelCase", "UPPER_CASE", "PascalCase"]
}
],
"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/imports": "error",
"simple-import-sort/exports": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "after-used", "argsIgnorePattern": "_" }],
"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-param-reassign": [
"error",
{
"props": false
}
],
"tsdoc/syntax": "warn",
"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
}
}
}
{}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ This repo allows web applications to directly retrieve keys stored on the Torus

### Bundling

This module is distributed in 3 formats
This module is distributed in 4 formats

- `esm` build `dist/directWebSdk.esm.js` in es6 format
- `commonjs` build `dist/directWebSdk.cjs.js` in es5 format
- `commonjs` build `dist/directWebSdk-bundled.cjs.js` in es5 format with problematic packages bundled (benfits non-webpack users)
- `umd` build `dist/directWebSdk.umd.min.js` in es5 format without polyfilling corejs minified
- `umd` build `dist/directWebSdk.polyfill.umd.min.js` in es5 format with polyfilling corejs minified

By default, the appropriate format is used for your specified usecase
You can use a different format (if you know what you're doing) by referencing the correct file
Expand Down
Loading

0 comments on commit a82d47e

Please sign in to comment.