bananahooks
Advanced tools
Comparing version 0.1.2 to 0.1.3
export { usePromise } from './use-promise'; |
@@ -1,5 +0,8 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var use_promise_1 = require("./use-promise"); | ||
exports.usePromise = use_promise_1.usePromise; | ||
//# sourceMappingURL=index.js.map | ||
'use strict' | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./bananahooks.cjs.production.js') | ||
} else { | ||
module.exports = require('./bananahooks.cjs.development.js') | ||
} |
@@ -1,2 +0,1 @@ | ||
export declare type AsyncFunctionOrPromise<T> = (() => Promise<T>) | Promise<T>; | ||
export declare function usePromise<T>(promiseOrFunction: AsyncFunctionOrPromise<T>, defaultValue: T): [T, Error | string | null, boolean]; | ||
export declare function usePromise<T>(promiseOrFunction: (() => Promise<T>) | Promise<T>, defaultValue: T): [T, Error | string | null, boolean]; |
{ | ||
"name": "bananahooks", | ||
"version": "0.1.2", | ||
"private": false, | ||
"version": "0.1.3", | ||
"author": { | ||
@@ -14,2 +13,9 @@ "name": "Julian Garamendy", | ||
}, | ||
"main": "dist/index.js", | ||
"umd:main": "dist/bananahooks.umd.production.js", | ||
"module": "dist/bananahooks.es.production.js", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"license": "MIT", | ||
@@ -24,42 +30,36 @@ "keywords": [ | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "rm -rf ./dist/* && tsc -p tsconfig.dist.json", | ||
"test": "react-scripts test --env=jsdom --silent --verbose", | ||
"test:coverage": "react-scripts test --env=jsdom --silent --verbose --coverage", | ||
"eject": "react-scripts eject" | ||
"start": "tsdx watch", | ||
"build": "tsdx build", | ||
"test": "tsdx test --env=jsdom --silent --verbose --watch", | ||
"test:coverage": "tsdx test --env=jsdom --silent --verbose --coverage" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"browserslist": [ | ||
">0.2%", | ||
"not dead", | ||
"not ie <= 11", | ||
"not op_mini all" | ||
], | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0" | ||
"react": ">=16.8" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "pretty-quick --staged" | ||
} | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
}, | ||
"devDependencies": { | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0", | ||
"react-testing-library": "^6.1.2", | ||
"react-scripts": "2.1.8", | ||
"typescript": "3.4.4", | ||
"@types/jest": "24.0.11", | ||
"@types/node": "11.13.5", | ||
"@types/react": "16.8.13", | ||
"@types/react-dom": "16.8.4" | ||
}, | ||
"resolutions": { | ||
"@types/react": "16.8.13" | ||
"@types/jest": "^24.0.13", | ||
"@types/react": "^16.8.17", | ||
"@types/react-dom": "^16.8.4", | ||
"husky": "^2.2.0", | ||
"prettier": "^1.17.1", | ||
"pretty-quick": "^1.10.0", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"react-testing-library": "^7.0.0", | ||
"tsdx": "^0.5.9", | ||
"tslib": "^1.9.3", | ||
"typescript": "^3.4.5" | ||
} | ||
} |
@@ -99,2 +99,30 @@ # Bananahooks | ||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
This project was bootstrapped with TSDX: | ||
# TSDX Bootstrap | ||
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx). | ||
## Local Development | ||
Below is a list of commands you will probably find useful. | ||
### `npm start` or `yarn start` | ||
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab. | ||
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" /> | ||
Your library will be rebuilt if you make edits. | ||
### `npm run build` or `yarn build` | ||
Bundles the package to the `dist` folder. | ||
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module). | ||
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" /> | ||
### `npm test` or `yarn test` | ||
Runs the test watcher (Jest) in an interactive mode. | ||
By default, runs tests related to files changed since the last commit. |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
17285
1
16
88
128
12
4
1