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

@elfin-fe/command-tools

v1.2.22

Published

> tool 校精灵命令行工具

Downloads

74

Readme

安装

npm install @elfin-fe/command-tools

管理 external-libraries

配置 .external.config.js 文件

首先在工程根目录创建文件 .external.config.js

module.exports = [
    {
        sshAddress: '[email protected]',
        skipInstall: true, // optional, default false, 不进行 npm install
        tracks: { // optional, 配置本地分支对应的远端分支
            localBranch: 'remote branch',
            master: 'origin/v2.1.5',
        }   
    },
]

初始化 external repositories

运行以下命令,对 external repositories 进行初始化
会自动创建一个 __external-libraries 目录
所有的依赖代码会放到这个目录中

elfin external init

重置 本地分支远端分支 的对应关系

修改 .external.config.js 文件对应依赖项的 tracks 字段
设置本地分支与远端分支的对应关系

比如:
前端在 dev3 分支开发
但是后端的 common 工程在 v2.3.5 分支
这时就需要设置 dev3 -> v2.3.5 的对应关系

设置好之后,运行以下命令重置依赖工程

elfin external reset-remote

重置所有依赖工程的分支

如果你需要重置所有依赖工程的分支到主项目的分支

比如:
当前的 workbench 分支是 dev3
需要把所有的依赖工程也切换到 dev3 (如果某个工程的开发分支并不是 dev3,这时需要使用 tracks 字段进行关联)

elfin external reset-branch

另外,如果你想切换依赖工程到特定的分支,使用以下命令

elfin external reset-branch -b <branch-name>