@antfu/install-pkg
Advanced tools
Comparing version 0.0.0 to 0.1.0
@@ -11,2 +11,4 @@ import execa from 'execa'; | ||
packageManager?: string; | ||
preferOffline?: boolean; | ||
additionalArgs?: string[]; | ||
} | ||
@@ -13,0 +15,0 @@ declare function installPackage(names: string | string[], options?: InstallPackageOptions): Promise<execa.ExecaReturnValue<string>>; |
@@ -51,5 +51,9 @@ var __create = Object.create; | ||
names = [names]; | ||
const args = options.additionalArgs || []; | ||
if (options.preferOffline) | ||
args.unshift("--prefer-offline"); | ||
return (0, import_execa.default)(agent, [ | ||
agent === "yarn" ? "add" : "install", | ||
options.dev ? "-D" : "", | ||
...args, | ||
...names | ||
@@ -56,0 +60,0 @@ ].filter(Boolean), { |
{ | ||
"name": "@antfu/install-pkg", | ||
"version": "0.0.0", | ||
"version": "0.1.0", | ||
"description": "Install package programmatically.", | ||
@@ -30,11 +30,2 @@ "main": "dist/index.js", | ||
], | ||
"scripts": { | ||
"prepublishOnly": "nr build", | ||
"dev": "nr build --watch", | ||
"start": "esno src/index.ts", | ||
"build": "tsup src/index.ts --format cjs,esm --dts --no-splitting", | ||
"release": "bumpp --commit --push --tag && pnpm publish", | ||
"lint": "eslint \"{src,test}/**/*.ts\"", | ||
"lint:fix": "nr lint -- --fix" | ||
}, | ||
"devDependencies": { | ||
@@ -53,3 +44,11 @@ "@antfu/eslint-config": "^0.7.0", | ||
"find-up": "^5.0.0" | ||
}, | ||
"scripts": { | ||
"dev": "nr build --watch", | ||
"start": "esno src/index.ts", | ||
"build": "tsup src/index.ts --format cjs,esm --dts --no-splitting", | ||
"release": "bumpp --commit --push --tag && pnpm publish", | ||
"lint": "eslint \"{src,test}/**/*.ts\"", | ||
"lint:fix": "nr lint -- --fix" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7225
114