1.2.4 • Published 8 months ago

@culur/utils-packages v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@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.

FunctionPackages
hasTailwindtailwindcss
hasSasssass or dart-sass or node-sass
hasVuevue 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 pnpm
pnpm install @culur/utils-packages --dev

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

📖 Usage

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

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

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

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

🗃️ Changelog

See CHANGELOG for more information on what has changed recently.

🔒 License

See LICENSE for license rights and limitations (MIT).

1.2.0

10 months ago

1.1.1

1 year ago

1.2.4

8 months ago

1.2.3

8 months ago

1.2.2

8 months ago

1.1.3

10 months ago

1.2.1

9 months ago

1.1.2

11 months ago

1.1.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago