25 lines
472 B
Plaintext
25 lines
472 B
Plaintext
// cell remove <alias|path> - Remove a package from dependencies or shop
|
|
|
|
var shop = use('internal/shop')
|
|
var fd = use('fd')
|
|
|
|
if (args.length < 1) {
|
|
log.console("Usage: cell remove <alias|path>")
|
|
$stop()
|
|
return
|
|
}
|
|
|
|
var pkg = args[0]
|
|
|
|
// Resolve relative paths to absolute paths
|
|
if (pkg == '.' || pkg.startsWith('./') || pkg.startsWith('../') || fd.is_dir(pkg)) {
|
|
var resolved = fd.realpath(pkg)
|
|
if (resolved) {
|
|
pkg = resolved
|
|
}
|
|
}
|
|
|
|
shop.remove(pkg)
|
|
|
|
$stop()
|