1 | # 🌹 @sharyn/check-setup
|
2 |
|
3 | [![npm](https://img.shields.io/npm/v/@sharyn/check-setup.svg)](https://www.npmjs.com/package/@sharyn/check-setup)
|
4 |
|
5 | It is used internally by Sharyn to determine which features to load.
|
6 |
|
7 | ## 🌹 Install
|
8 |
|
9 | ```bash
|
10 | yarn add @sharyn/check-setup
|
11 | ```
|
12 |
|
13 | ## 🌹 Usage
|
14 |
|
15 | ```js
|
16 | import { hasPackage, hasFile } from '@sharyn/check-setup'
|
17 |
|
18 | hasPackage('koa') // true or false based on your package.json
|
19 | hasPackage('koa', true) // true or Error
|
20 |
|
21 | hasFile('webpack.config.js') // true or false from the root of your project
|
22 | hasFile('webpack.config.js', true) // true or Error
|
23 | ```
|