I hereby claim:
- I am babie on github.
- I am babiewildheart (https://keybase.io/babiewildheart) on keybase.
- I have a public key ASAndQow11Ox38wAIlVk4FKiRzq032FH6fIfFBdCGpHLIAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| const fs = require('fs') | |
| const path = require('path') | |
| const traverse = require('traverse') | |
| const setupTestsFile = fs.existsSync( | |
| path.resolve(__dirname, 'src/setupTests.ts') | |
| ) | |
| ? '<rootDir>/src/setupTests.ts' | |
| : undefined |
| { | |
| "transform": { | |
| "^.+\\.tsx?$": "ts-jest" | |
| }, | |
| "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | |
| "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], | |
| "testPathIgnorePatterns": [ | |
| "<rootDir>/src/", | |
| "<rootDir>/build/", | |
| "<rootDir>/dist/", |
| const fs = require('fs') | |
| const path = require('path') | |
| const appDirectory = fs.realpathSync(process.cwd()) | |
| const resolveApp = relativePath => path.resolve(appDirectory, relativePath) | |
| module.exports = { | |
| webpack: (config, env) => ({ | |
| ...config, | |
| entry: [resolveApp('src/server.ts')], |
| { | |
| "rulesDirectory": ["tslint-plugin-prettier"], | |
| "plugins": ["prettier"], | |
| "extends": [ | |
| "tslint-config-airbnb", | |
| "tslint-config-standard", | |
| "tslint-config-prettier" | |
| ], | |
| "linterOptions": { | |
| "exclude": ["config/**/*.js", "node_modules/**/*.ts"] |
| { | |
| "extends": ["airbnb", "standard", "prettier"], | |
| "plugins": ["react", "mocha", "standard", "prettier"], | |
| "parserOptions": { | |
| "ecmaFeatures": { | |
| "jsx": true | |
| } | |
| }, | |
| "env": { | |
| "mocha": true, |
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "javascript.validate.enable": false, | |
| "files.autoSave": "afterDelay", | |
| "files.autoSaveDelay": 1000, | |
| "eslint.enable": true, | |
| "eslint.autoFixOnSave": false, | |
| "eslint.alwaysShowStatus": true, | |
| "tslint.enable": true, | |
| "tslint.autoFixOnSave": false, |
| // Place your key bindings in this file to overwrite the defaults | |
| [ | |
| { | |
| "key": "ctrl+shift+tab", | |
| "command": "workbench.action.previousEditor" | |
| }, | |
| { | |
| "key": "ctrl+tab", | |
| "command": "workbench.action.nextEditor" | |
| }, |
| export function encode (blob) { | |
| return new Promise((resolve) => { | |
| const r = new FileReader() | |
| r.onload = () => { | |
| const dataURL = r.result | |
| const base64 = dataURL.split(',', 2)[1] | |
| resolve(base64) | |
| } | |
| r.readAsDataURL(blob) |