@culur/utils-packages

1.0.4 • Public • Published

@culur/utils-packages

NPM Version NPM Download NPM License

CodeFactor Codecov Build and release

Check if environments are installed or not.

✨ Features

This library use local-pkg to check if the following environments are installed.

Function Packages
hasTailwind tailwindcss
hasSass sass or dart-sass or node-sass
hasVue vue or nuxt or vitepress or @slidev/cli

💿 Installation

Add @culur/utils-packages dependency to your project.

# Using npm
npm install @culur/utils-packages --save-dev

# Using yarn
yarn add @culur/utils-packages --dev

📖 Usage

import {
  hasSass,
  hasTailwind,
  hasVue,
  updateDefaultPackages,
} from '@culur/utils-packages';

// detect automatically or override
updateDefaultPackages({
  sass: false,
  tailwind: true,
  // vue: true,
});

hasSass(); // false (from override)
hasTailwind(); // true (from override)
hasVue(); // true or false (detect automatically)
import { defineHasPackages } from '@culur/utils-packages';

// initialize a new instance
const {
  updateDefaultPackages, //
  hasSass,
  hasTailwind,
  hasVue,
} = defineHasPackages({
  sass: false, // (override)
});

🗃️ Changelog

See CHANGELOG for more information on what has changed recently.

🔒 License

See LICENSE for license rights and limitations (MIT).

Readme

Keywords

Package Sidebar

Install

npm i @culur/utils-packages

Weekly Downloads

34

Version

1.0.4

License

MIT

Unpacked Size

17.6 kB

Total Files

22

Last publish

Collaborators

  • phamhongphuc