@copart/web-app-utils
Will serve as a common library to provide utilities for next generation web apps built in Copart.
Usage
yarn add -S @copart/web-app-utils
import { storage, fetcher } from '@copart/web-app-utils'
storage.accessToken
storage.isAuthenticated
fetcher[method]()
Contribution
Clone this repository and install its dependencies:
git clone https://github.com/comproui
yarn install && yarn tools:start
yarn build
builds the library to dist
, generating three files:
A CommonJS bundle, suitable for use in Node.js, that require
s the external dependency. This corresponds to the "main"
field in package.json
dist/web-app-utils.esm.js
an ES module bundle, suitable for use in other people's libraries and applications, that import
s the external dependency. This corresponds to the "module"
field in package.json
dist/web-app-utils.umd.js
a UMD build, suitable for use in any environment (including the browser, as a <script>
tag), that includes the external dependency. This corresponds to the "browser"
field in package.json
yarn dev
builds the library, then keeps rebuilding it whenever the source files change using rollup-watch.
yarn test
builds the library, then tests it.