Utils, rules, and configs that are shared by Frontend projects @ Razorpay
Documentation can be found in the docs directory.
- Mocha, Chai for tests
- Istanbul for coverage
- JSDoc, Documentation for documentation
- Babel for transpiling
- Rollup for bundling
- Stylus for CSS
- ESLint for linting
- Used with Node v10.18.0
npm ito install all dependencies
npm run play:implicit- Starts a playground offe/implicitmodules. Navigate toplay/implicit/index.htmlfrom the browser.
npm run lint-documentation- Lints documentationnpm run document- Generates documentation
npm run test:singular <path_to_file>- Run tests for specified file/pathnpm run test- Runs all testsnpm run coverage- Runs all tests and prints coveragenpm run build-coverage- Runs all tests and generates HTML coverage incoveragedirectory
Binaries (bin)
$- Injects the scope of this repository into the consuming repositoryserve- 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.documentutils_El- Utils for DOM elementsglobal-window.*orglobal.*utilsfetch- AJAX utilPromise- Promise polyfill
Scripts (scripts)
babel-plugins- List and config of babel pluginseslint- ESLint helpers and configeslint-compatestlinrc- ESLint ruleslintOutput- Helpers to lint generated buildsrollup-injects- Implicit injects for rolluprollup-plugins- Utils for rolluprollup-plugin-stylus- Rollup utils for bundling Stylus