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

svn-code

v1.1.9

Published

A cli tool for loca ctrl

Downloads

38

Readme

svn-code

svn based on the efficient conversion plug-in svn-code

Installation

Prerequisites: Node.js (>=4.x, 6.x preferred), npm version 3+.

npm install -g svn-code

Usage

第一步 初始化配置

scnpm init

执行完毕init命令,会在【C:\svn-code】目录初始化全局配置文件

{
	//本地仓库地址
	"loca-warehouse": "D:\\svn-code-warehouse",
	//已初始化的项目列表
	"config-project": [
		{
			"url": "C:\\Users\\xxx\\xxx"
		}
	]
}

第二步 修改配置文件

{
	//默认的插件存放相对路径
	"pulg-path": "src/svn-code-page",
	//本项目所需插件列表
	"pulg-in": [
		{
			//已内置的则可以直接配置name
			"name":"xxxx"
		},{
			/* 还可以配置个性化的其余插件 */
			
			//svn地址
			"svnurl":"svn://xxxx.com/xxxx/xxxx",
			//插件名(一般即为文件名)
			"folderName":"svn",
			//本插件所放相对路径,不配置则取默认相对路径
			"pulg-path": "src/svn-code-page2"
		}
	]
}

第三步 安装/更新

scnpm install

场景分析

  • 1、当我在需要删除本项目配置时该怎么办?

删除配置不建议直接删除配置文件(除非仅用于同步文件),因为在本地磁盘还保存有全局配置文件,里面含有本项目相关配置

如果真的是直接手动删除配置文件 且 不再需要,只能前往【C:\svn-code】手动删除指定的已配置项目列表项

建议:

//删除本项目配置文件
scnpm delete
//或者 删除本项目配置文件 和 本项目产生的插件文件
scnpm deleteAll
  • 2、当我需要更换插件在项目中的路径时怎么办?

更换路径不建议直接修改配置文件并install,这样的话项目中原有的已经install生成的插件不会删除

建议先删除已成生的插件

scnpm deleteCode
  • 3、当我本地很多项目都使用了svn-code生成了插件,我该怎么一次性全部install

在单个项目init、install时,已自动将本项目配置到了全局公共配置文件,所以只需要在任意目录运行命令

scnpm installAll
  • 4、当不小心本地全局配置文件受损怎么办?

如果全局配置文件受损,则需要每个用到的项目都执行init命令即可。

  • 5、当频繁在执行某命令时需要install时该怎么办?

如果在频繁执行某npm命令时都需要install,比如npm run dev、npm run build时,可以参考:

【关于运行时更新插件命令】

全部命令

  • 1、关于插件配置类命令
// 初始化配置文件
scnpm init

// 根据配置文件安装插件
scnpm install

// 根据配置文件 安装所有其他和本项目共享本地库的项目的插件(只要项目关联的本地仓库一致,则为共享)
scnpm installAll

// 删除配置文件
scnpm delete

// 删除配置安装的所有插件
scnpm deleteCode

// 删除配置、安装的所有插件
scnpm deleteAll

// 初始化插件目录
scnpm initWarehouse
  • 2、关于运行时更新插件命令
scnpm run dev
//等同于
npm run dev


scnpm run build
//等同于
npm run build


scnpm xx xxx xxx
//等同于
npm xx xxx xxx

...

notice

本插件致力于根据配置文件,管理公共的模块,模块放在svn服务器,在install后会在本地磁盘创建仓库,并根据配置选择性覆盖项目内的插件

综上所述,本插件在执行时依赖svn命令,请确保电脑支持svn命令

打开电脑cmd后,运行svn,如果不提示无此命令,则一切正常,否则需要重新安装svn(不需要卸载,可以保留已有的svn账户),在安装时选中【command line client tools】,然后重启电脑