@iceworks/npm-utils
npm utils for iceworks
Last updated 3 months ago by sobear .
MIT · Original npm · Tarball · package.json
$ cnpm install @iceworks/npm-utils 
SYNC missed versions from official npm registry.

@iceworks/npm-utils

some utils for ice.

Installation

$ npm install @iceworks/npm-utils --save

Basic Usage

import { getNpmLatestSemverVersion } from 'ice-npm-utils';

API

getNpmRegistry(npmName)

Default return https://registry.npm.taobao.org

getUnpkgHost(npmName)

Default return https://unpkg.com

getNpmLatestSemverVersion(npmName, baseVersion)

Return Promise.resolve(version)

getLatestVersion(npmName)

Return Promise.resolve(version)

getNpmInfo(npmName)

Return Promise.resolve(response.data)

getNpmClient(npmName)

Default return npm

checkAliInternal()

Return Promise.resolve(isInternal)

getNpmTarball(name, version)

Return Promise.resolve(tarball)

getAndExtractTarball(destDir, tarball, progressFunc: () => {})

Return Promise.resolve(allFiles: string[])

Custom

Custom Npm Registry

process.env.REGISTRY=https://registry.npmjs.org

Custom Unpkg Host

process.env.UNPKG=https://unpkg.com

Custom Npm Client

process.env.NPM_CLIENT=cnpm

Current Tags

  • 0.1.1                                ...           latest (3 months ago)

1 Versions

  • 0.1.1                                ...           3 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (7)
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |