Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support custom package manager #4621

Merged
merged 5 commits into from Sep 30, 2019
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/@vue/cli/lib/util/ProjectPackageManager.js
Expand Up @@ -13,6 +13,7 @@ const {
hasProjectPnpm
} = require('@vue/cli-shared-utils/lib/env')
const { isOfficialPlugin, resolvePluginId } = require('@vue/cli-shared-utils/lib/pluginResolution')
const { log, warn } = require('@vue/cli-shared-utils/lib/logger')

const { loadOptions } = require('../options')
const getPackageJson = require('./getPackageJson')
Expand Down Expand Up @@ -76,7 +77,9 @@ class PackageManager {
}

if (!SUPPORTED_PACKAGE_MANAGERS.includes(this.bin)) {
throw new Error(`Unknown package manager: ${this.bin}`)
log()
warn(`Unknown package manager: ${this.bin}. Currently we only support one of [${SUPPORTED_PACKAGE_MANAGERS.join(', ')}]. ${this.bin} may not be well supported and we are now treating it like npm but potential errors could happen. See if you can use '--registry' instead.`)
PACKAGE_MANAGER_CONFIG[this.bin] = PACKAGE_MANAGER_CONFIG.npm
}
}

Expand Down