lego-client
lego client api
Last updated 5 years ago by helinjiang .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lego-client 
SYNC missed versions from official npm registry.

lego-client

NPM version Build Status Coverage Status NPM downloads

lego client api


Install

$ npm install lego-client -g

Usage

var client = require('lego-client');

// global configuration
client.config({
  registry: 'http://registry.legojs.io',
  auth: '12345'
})

// install seajs
client.install({name: 'seajs'}, function(err) {
  console.log(err);
});

// overwrite global config
client.install({name: 'seajs'}, {registry: 'http://your-registry'}, function(err) {
  console.log(err);
});

API

config

Global configuration

  • registry: registry url of yuan server
  • global_registry: global registry, others are private
  • proxy: an HTTP proxy, pass to request
  • auth: the authKey that copied from legojs accout page
  • temp: the temp directory

login

Login legojs.io, arguments below

  • username: the username of registry
  • authkey: the authKey that copied from legojs accout page

install

Install a package, arguments below

  • name: the package name, can also be name@version
  • cwd: the dependencies of the package in the cwd will be installed, use it when name isn't specified
  • destination: the directory that install to
  • force: force download packages from registry, no cache
  • save: save name to package.dependencies
  • saveDev: save name to package.devDependencies

search

Search a package, arguments below

  • name: search packages with your query name

info

Get package info, arguments below

  • name: the package name
  • version: the package version

publish

Publish a package, arguments below

  • cwd: where is your package
  • tag: publish with a given tag that you can install by name@tag, default is stable
  • force: force publish when the package exists

unpublish

Unpublish a package, arguments below

  • name: the package name
  • version: the package version

LISENCE

Copyright (c) 2014 popomore. Licensed under the MIT license.

Current Tags

  • 0.0.13                                ...           latest (5 years ago)

13 Versions

  • 0.0.13                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.11                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 16
Last Day 0
Last Week 0
Last Month 27
Dependencies (20)
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |