@copart/front-end-utils
v1.1.0
Published
All front end utility methods live here
Readme
Front end Utils
Repository containing javascript utility methods for string, date and regex based manipulation
Getting Started
- Clone this repository and install its dependencies
$ git clone https://github.com/copartit/front-end-utils
$ cd front-end-utils
$ yarn install && yarn typedyarn typed searches the libdef repo and download all the libdefs that are relevant for project and install them.
- Watch files and recompile whenever they change
$ yarn startyarn start builds the library, then keeps rebuilding it whenever the source files change.
- Compile and bundle code
$ yarn buildyarn build builds the library to dist, generating three major files:
dist/frontendutils.cjs.jsa CommonJS bundle, suitable for use in Node.js, that requires the external dependency. This corresponds to the"main"field in package.jsondist/frontendutils.esm.jsan ES module bundle, suitable for use in other people's libraries and applications, that imports the external dependency. This corresponds to the"module"field in package.jsondist/frontendutils.umd.jsa UMD build, suitable for use in any environment (including the browser, as a tag), that includes the external dependency. This corresponds to the"browser"field in package.json
- Check the code quality
$ yarn lintyarn lint checks the code, whether it meets Airbnb's JavaScript style guide, and type checking using Flow.
- Run the unit tests
$ yarn testyarn test runs the unit tests using Jest to check if the function is executable.
