@sharyn/check-setup

It is used internally by Sharyn to determine which features to load.

Usage no npm install needed!

<script type="module">
  import sharynCheckSetup from 'https://cdn.skypack.dev/@sharyn/check-setup';
</script>

README

🌹 @sharyn/check-setup

npm

It is used internally by Sharyn to determine which features to load.

🌹 Install

yarn add @sharyn/check-setup

🌹 Usage

import { hasPackage, hasFile } from '@sharyn/check-setup'

hasPackage('koa') // true or false based on your package.json
hasPackage('koa', true) // true or Error

hasFile('webpack.config.js') // true or false from the root of your project
hasFile('webpack.config.js', true) // true or Error