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

@durka/cli

v0.2.7

Published

多命令行管理工具,和微服务、微前端类似,此工具也可以理解成微命令行

Downloads

29

Readme

@durka/cli

多命令行管理工具,和微服务、微前端类似,此工具也可以理解成微命令行(有点类似 npx,但比 npx 的功能更多)

理念:用一个命令统一管理所有的命令行工具

现状:

  • react 项目可能需要 react 相关的打包编译工具
  • vue 项目可能需要 vue 相关的打包编译工具
  • 小程序项目可能需要小程序相关的打包编译工具,根据不同种类的小程序,还可以再细分成不同类型的小程序相关的打包编译工具

使用 @durka/cli,你不需要去学习各种不同的打包工具,你都可以做到:

  • durka dev => 启动本地开发环境
  • durka build => 打包编译当前项目
  • durka pack => 将一个项目打包成一个脚手架项目(可以通过 durka init 来使用)
  • durka init => 创建一个新项目
  • ... 更多自定义命令

Features

  • 让开发更专注于业务,而不是构建

    本地项目不需要安装任何的 SDK (可以选择将一个轻量级的 @durka/cli 安装在本地,不过更建议全局安装),让本地项目更专注于做和构建无关的事

  • 单一职责

    不同 SDK 相互隔离,互不影响,可以让一个 SDK 专注于做一件事,避免因为一个 SDK 需要更新而更新整个构建系统

  • 连接不同的 SDK、不同的版本

    统一管理不同的 SDK,随意调用不同 SDK;同一个 SDK 的不同版本也可以并存,并且可以随意快速切换版本

  • 自动升级

    自动检查当前使用的 SDK 是否可更新,并且可以自动更新,更新完可以继续执行命令,不阻塞

  • 脚手架

    内置一个脚手架 SDK,支持快速基于已有模板创建新项目(durka init),也支持快速将一个项目生成脚手架模板(durka pack)

Installation

npm i -g @durka/cli

Usage

package.json 中附加的配置

  • durka.commands 配置 durka 的命令,及其所关联的 SDK,示例:
"durka": {
  "commands": {
    "build": "@durka/[email protected]"
  }
},

当运行 durka build 时,会自动加载 @durka/[email protected],然后识别到 @durka/rollup-cli 中的 bin 文件路径,再执行 node rollup-cli/path/to/bin build

另外,上面的配置也可以配置成:

"durka": {
  "commands": {
    "build": {
      "name": "@durka/rollup-cli",
      "version": "@0.0.5"
    }
  }
},

可以在 vscode 的 setting.json 中配置下面语句,这样就可以支持在编写 package.json 时自动补全 durka 相关的字段

  "json.schemas": [
    {
      "fileMatch": [ "package.json" ],
      "url": "https://qiu8310.github.io/schema/package.json"
    }
  ]

Changelog

Changelog

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT