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

cangku

v0.0.2

Published

Create local repository

Downloads

10

Readme

cangku

Create local repository

when developing with others,you provide business code to be used by many subproject(each subproject developed by each people) within a big project. If you pack you code to npm ,maybe generate many version which need many people to install by many times,and reading the source code is difficult . When support business code,use local repository is better.

Installation


//global install

npm install cangku -g

//local install

npm install cangku -D

Features

  • support version
  • list changed files

Usage

handle respository

create a local repository,location in some dir,and create local repository

after create components,it will include sources and versions directory,in sources dir,write you business code.

//if install by global
cangku create components

//if install by local
npx cangku create components

upgrade respository

Write code in components sources directory,when the code is done, push a new version

//location in components dir,follow command will prompt you to input version
cangku push

use respository

const cangku = require("cangku");
let respository = cangku(projectComponentLibUrl, subProjectComponentUrl);
await respository.pull();

/* 
will console like 
delete:request/index.js
changed:utils/index.js
*/

when pull respository,the default upgrade option is as follows

version 1.1.9&&1.1.8 is low upgrade,1.2.1&&1.1.9 is middle upgrade,2.0.0&&1.9.9 is high upgrade

//default option
{
      low: {
        console: true,//console.log what change in new version
        ask: false//ask people whether upgrade or not
      },
      middle: {
        console: true,
        ask: true
      },
      high: {
        console: true,
        ask: true
      }
    }

//cover default options
/*
Interface Action{
    console:Boolean;
    ask:Boolean;
}

Interface Option{
low?:Action;
middle?:Action;
high?:Action;
}
*/

respository.setRank(option);

lock respository

respository.setLock(true); //lock version and will not
respository.setLock("middle"); //lock version if version compare is high and middle,if send high,lock version when compare is high

api

cangku create name
cangku push
cangku remove //via prompt to remove a version