Skip to content

razorpay/common-frontend-utils

Repository files navigation

Common Frontend Utils

Utils, rules, and configs that are shared by Frontend projects @ Razorpay

Build Status

Documentation

Documentation can be found in the docs directory.

Things used in/from this repo

Commands

  • Used with Node v10.18.0
  • npm i to install all dependencies

Development/Playground

  • npm run play:implicit - Starts a playground of fe/implicit modules. Navigate to play/implicit/index.html from the browser.

Documentation

  • npm run lint-documentation - Lints documentation
  • npm run document - Generates documentation

Tests

  • npm run test:singular <path_to_file> - Run tests for specified file/path
  • npm run test - Runs all tests
  • npm run coverage - Runs all tests and prints coverage
  • npm run build-coverage - Runs all tests and generates HTML coverage in coverage directory

Contents

Binaries (bin)

  • $ - Injects the scope of this repository into the consuming repository
  • serve - Reverse proxy, simplified. Usage: serve folder --port 8000 --proxy /api=https://api.razorpay.com

Implicit Modules (src/fe/implicit)

  • _ - General utils
  • _Str - String utils
  • _Arr - Array utils
  • _Obj - Object utils
  • _Func - Function utils
  • _Doc - window.document utils
  • _El - Utils for DOM elements
  • global - window.* or global.* utils
  • fetch - AJAX util
  • Promise - Promise polyfill

Scripts (scripts)

  • babel-plugins - List and config of babel plugins
  • eslint - ESLint helpers and config
  • eslint-compat
  • estlinrc - ESLint rules
  • lintOutput - Helpers to lint generated builds
  • rollup-injects - Implicit injects for rollup
  • rollup-plugins - Utils for rollup
  • rollup-plugin-stylus - Rollup utils for bundling Stylus

About

Common Frontend Utils

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 20

Languages