All Projects â†’ unjs â†’ Lmify

unjs / Lmify

Licence: mit
Install NPM dependencies programmatically 🤙

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lmify

Have It
The fastest NPM install does nothing because you already have it
Stars: ✭ 75 (-23.47%)
Mutual labels:  install, npm, yarn
Actions Package Update
keeps npm dependencies up-to-date by making pull requests from GitHub Actions or CI.
Stars: ✭ 36 (-63.27%)
Mutual labels:  npm, yarn
Mailgo
💌 mailgo, a new concept of mailto and tel links
Stars: ✭ 978 (+897.96%)
Mutual labels:  npm, yarn
Gitpkg
use a sub directory of a github repo as yarn / npm dependency directly
Stars: ✭ 54 (-44.9%)
Mutual labels:  npm, yarn
Yarpm
CLI tool to run npm scripts with either npm or yarn, depending on how it was started
Stars: ✭ 13 (-86.73%)
Mutual labels:  npm, yarn
Magic
CSS3 Animations with special effects
Stars: ✭ 7,253 (+7301.02%)
Mutual labels:  npm, yarn
React Use Api
Async HTTP request data for axios. Designed for diverse UI states, SSR and data pre-caching.
Stars: ✭ 49 (-50%)
Mutual labels:  npm, yarn
Instagramfirstcommenter
This bot will post a predefined comment as fast as possible to a new post on the target profile. I used this to successfully win tickets for a big music festival.
Stars: ✭ 26 (-73.47%)
Mutual labels:  automation, npm
Yarn.msbuild
MSBuild integration for the Yarn package manager.
Stars: ✭ 57 (-41.84%)
Mutual labels:  npm, yarn
Package.json
文件 package.json 的说明文档。
Stars: ✭ 67 (-31.63%)
Mutual labels:  npm, yarn
Npm Script Naming Ideas
Ideas for naming npm scripts
Stars: ✭ 12 (-87.76%)
Mutual labels:  npm, yarn
Node Developer Boilerplate
🍭 Boilerplate for ES6+ Node.js and npm Developer
Stars: ✭ 82 (-16.33%)
Mutual labels:  npm, yarn
Yarn Package Boilerplate
An Yarn package with babel, jest, flow, prettier and more
Stars: ✭ 10 (-89.8%)
Mutual labels:  npm, yarn
Typac
install npm packages along with corresponding typings
Stars: ✭ 29 (-70.41%)
Mutual labels:  npm, yarn
Install Self Peers
Stars: ✭ 26 (-73.47%)
Mutual labels:  npm, yarn
Tsdx
Zero-config CLI for TypeScript package development
Stars: ✭ 9,010 (+9093.88%)
Mutual labels:  npm, yarn
Np
A better `npm publish`
Stars: ✭ 6,401 (+6431.63%)
Mutual labels:  npm, yarn
Vscode Yarn
VSCode extension to manage yarn commands
Stars: ✭ 18 (-81.63%)
Mutual labels:  npm, yarn
Floatsidebar.js
Lightweight (2kb gzipped), zero-dependency javascript library for making float sidebars based on the finite state machine
Stars: ✭ 56 (-42.86%)
Mutual labels:  npm, yarn
Emma Cli
📦 Terminal assistant to find and install node packages.
Stars: ✭ 1,201 (+1125.51%)
Mutual labels:  npm, yarn

lmify

lmify

Let Me Install It For You!

npm version npm downloads packagephobia Github Actions CI Codecov Dependencies Standard JS

Install NPM dependencies programmatically 🤙

Features

  • Support Yarn and NPM
  • Auto package manager detection
    • Using Yarn if yarn.lock
    • Using NPM if package-lock.json or package.json
  • Singleton or Class API
  • Optional granters

Install

Using yarn:

yarn add lmify

Using npm:

npm install lmify

Usage

install(package|packages)

Install one or more packages in rootDir using the preferred package manager.

const { install } = require('lmify')

await install('package-name')

setPackageManager(name)

Set preferred package manager to use. By default, it will be guessed.

const { setPackageManager } = require('lmify')

setPackageManager('yarn')

setRootDir(rootDir)

Set project root dir. This causes package manager detection to happen on the next install.

const { setRootDir } = require('lmify')

setRootDir(proccess.cwd())

addGranter(fn)

Add a granter function to ask the user before installing packages.

This function accepts an array of packages to be added and should return Promise<Boolean>.

Without a granter, install immediately adds package.

If multiple granters added, the first response will be used (either deny or allow).

const { addGranter } = require('lmify')

addGranter(async packages => {
  console.log('Installing packages:', packages)
  return true // Allow
})

Class: LMIFY

You can choose between using singleton instance or creating a new instance of LMIFY:

const LMIFY = require('lmify')

const constumInstance = new LMIFY(options)

options

  • stdout: Defaults to process.stdout
  • stderr: Defaults to process.stderr
  • rootDir: Defaults to process.cwd()
  • packageManager: Better if specified or install will throw a warning if no package manager is detected

License

MIT - Made with 💖 by Nuxt.js team!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].