npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

package-copy

v0.1.4

Published

<img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">

Downloads

19

Readme

package-copy (package副本)

致力于解放FE的劳动力,让我们搬更少的砖!

  • 喜欢请给星,我会更有动力持续维护!https://github.com/pomelott/package-copy
  • 兼容npm,cnpm(yarn会在后续支持)
  • 你可以用此包重新生成指定的json文件,并以指定的json文件进行常规操作。结果会响应在根目录的node_modules中。并同时响应在package-copy.json(默认)和package.json文件中。
  • 此工具遵循npm、cnpm的原有特性,如cnpm不存在锁机制,因此当使用cnpm install是,若不指定版本号,则获取到的version为latest.
  • 此工具常用于在前端工程化定制脚手架中,需要将脚手架环境依赖与项目的业务依赖区别管理时使用。

Install

npm install --save-dev package-copy

Usage

use with Command Line

./node_modules/.bin/pkg-copy config json=./package-test.json

./node_modules/.bin/pkg-copy init

./node_modules/.bin/pkg-copy init json=./package-test.json

./node_modules/.bin/pkg-copy install

./node_modules/.bin/pkg-copy install -D vue-loader

./node_modules/.bin/pkg-copy uninstall --save [email protected] react

use with js

const PkgCopy = require('package-copy');

// 如果不初始化配置项,则默认在执行目录下生成package-copy.json

let pkg = new PkgCopy({
    json: './package-test.json'
})

pkg.exec('pkg-copy init')
pkg.exec('pkg-copy uninstall').then()
pkg.exec('pkg-copy install vue -S').then((msg) => {})  // use promise
await pkg.exec('pkg-copy install vue -S')   // use async/await