UNPKG

@eggjs/utils

Version:

Utils for all egg projects

59 lines (39 loc) 1.89 kB
# @eggjs/utils [![NPM version][npm-image]][npm-url] [![CI](https://github.com/eggjs/utils/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/utils/actions/workflows/nodejs.yml) [![Test coverage][codecov-image]][codecov-url] [![npm download][download-image]][download-url] [![Node.js Version](https://img.shields.io/node/v/@eggjs/utils.svg?style=flat)](https://nodejs.org/en/download/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com) [npm-image]: https://img.shields.io/npm/v/@eggjs/utils.svg?style=flat-square [npm-url]: https://npmjs.org/package/@eggjs/utils [codecov-image]: https://codecov.io/github/eggjs/utils/coverage.svg?branch=master [codecov-url]: https://codecov.io/github/eggjs/utils?branch=master [download-image]: https://img.shields.io/npm/dm/@eggjs/utils.svg?style=flat-square [download-url]: https://npmjs.org/package/@eggjs/utils Utils for all egg projects. ## Installation ```bash npm i @eggjs/utils ``` ## API ### `getPlugins(options)` - {String} baseDir - the current directory of application - {String} framework - the directory of framework - {String} env - egg environment ### `getLoadUnits(options)` - {String} baseDir - the current directory of application - {String} framework - the directory of framework - {String} env - egg environment ### `getConfig(options)` - {String} baseDir - the current directory of application - {String} framework - the directory of framework - {String} env - egg environment ### `getFrameworkPath(options)` - {String} baseDir - the current directory of application - {String} framework - the directory of framework ## License [MIT](LICENSE) ## Contributors [![Contributors](https://contrib.rocks/image?repo=eggjs/utils)](https://github.com/eggjs/utils/graphs/contributors) Made with [contributors-img](https://contrib.rocks).