0.1.993 • Published 9 years ago

ym-modules v0.1.993

Weekly downloads
1
License
ISC
Repository
-
Last release
9 years ago

CNPM PRIVATE PACKAGE USAGE

INSTALLATION --OPTIONAL

npm install -g cnpm

use taobao registry

npm install -g cnpm --registry=https://registry.npm.taobao.org

if you don't want use cnpm to instead npm, you can use npm to replace cnpm in the following content.

SET REGISTRY

cnpm set registry=http://code.tlifang.com:7001

PUBLISH

if you want to publish your package to the private registry, you should do something first:

  • sign up an account for npmjs.org first;
  • note your account email and username;
  • give xuezi your email and username;
  • xuezi configure your email&username to the code Server;

now, login your npm account use cnpm;

cnpm login
> Username: your username
> Password: your Password
> Email:    your email
Logged in as username on http://code.tlifang.com:7001/

SCOPE

The server has configure scopes for private package space. package can only publish to those scope spaces

@scope1, @scope2, @scope3, ...

configure name param in your package.json for example @scope=@ym

{
  "name": "@ym/module_name",
  "version": "1.0.0",
  "description": "description",
  "main": "index.js",
  "scripts": {
    "test": "-dev"
  },
  "keywords": [],
  "author": "xuezi",
  "license": "ISC",
  "dependencies": {
  },
  "homepage": "",
  "repository": {
    "type": "",
    "url": ""
  },
  "engines": {
    "node": ">=4.0.0"
  }
}

Name specification:

"name": "@ym/module_name"

now , you can publish your package

cd your_package_dir
cnpm publish
  • WARNING

everytime before publish package, you should re configure version param in your package.json

INSTALL PRIVATE PACKAGE

cnpm install @ym/module_name [--save]

REQUIRE PRIVATE PACKAGE

var module = require('@ym/module_name');
1.0.0

8 years ago

0.1.993

9 years ago

0.1.92

10 years ago

0.1.91

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.77

10 years ago

0.1.76

10 years ago

0.1.75

10 years ago

0.1.7

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.31

10 years ago

0.1.3

10 years ago