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

idc-cli

v1.0.34

Published

cli create directory

Downloads

17

Readme

idc-cli

一个专注于根据模板创建默认工单步骤的脚手架,一个有潜力的脚手架。

feature

  1. [x] 接收传入的新工单类型,根据内置的template,生成目录、文件,自动写入import信息。

  2. [x] 新工单的步骤可以选择,现支持4/5,默认为5步。

  3. [x] git hooks,push时,自动发布到npm.js

install

cnpm i idc-cli -g 或者 npm i idc-cli -g


输入idc会显示下面的内容, 说明安装成功。

Usage: idc [options] [command]

  Options:

    -V, --version   output the version number
    -h, --help      output usage information

  Commands:

    addOrder|ao     add new order   # 增加工单
    listOrder|lo    list all order  # 列出已有工单
    deleteOrder|do  delete a order  # 删除某一种工单
    autoImport|ai   auto import orders to steps # 自动import工单到 stepCommon 中。
  • idc ao或者idc addOrder, 根据提示输驼峰形式的工单类型即可创建成功,import信息会自动写入 stepCommon中。注意,重复的工单不能创建成功,也不会覆盖之前的工单!

  • idc lo或者idc listOrder, 会列出现有的工单。

  • idc do或者idc deleteOrder, 删除某种工单,根据提示信息输入工单类型的key和确认的yes,即可删除。删除需要谨慎操作。 如果不慎将以写好的工单删除,可以通过git checkout dir的方式找回

  • idc ai或者idc autoImport, 根据提示输驼峰形式的工单类型即可创建成功,import信息会自动写入 stepCommon中。

update

如果idc-cli版本升级了,需要更新本地已经安装的idc-cli,通过命令npm update idc-cli -g即可更新到最新版。

如果这样不能够成功,可以尝试卸载idc-cli,再重新安装

// 卸载
npm uninstall -g idc-cli

// 安装
npm i idc-cli -g

idc-cli开发调试模式

在项目根目录,这样执行即可:./bin/idc.js lo,其他命令参考上文的使用

主要逻辑

举例来说,我们创建名字为bigDone的工单类型

  1. 默认会修改以下文件
src/views/unifiedOrder/stepCommon/step2.vue
src/views/unifiedOrder/stepCommon/step3.vue
src/views/unifiedOrder/stepCommon/step4.vue
src/views/unifiedOrder/stepCommon/step5.vue

这里的修改很简单,就是注册了子组件

  1. 会创建以下文件
src/views/unifiedOrder/typeList/bigDone/bigDoneStep2.vue
src/views/unifiedOrder/typeList/bigDone/bigDoneStep3.vue
src/views/unifiedOrder/typeList/bigDone/bigDoneStep4.vue
src/views/unifiedOrder/typeList/bigDone/bigDoneStep5.vue
src/views/unifiedOrder/typeList/bigDone/bigDoneMixins.js
src/views/unifiedOrder/typeList/bigDone/bigDoneDetail.js
  1. 对于新版的工单也许你会用不到 src/views/unifiedOrder/typeList/bigDone/bigDoneDetail.js, 如果用不到删除即可。