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

elite-tool

v1.1.1

Published

elite tools

Downloads

3

Readme

Elite Tools

Init demo

测试

  • 测试结果生成html报表(mocha --reporter mochawesome tests)
  • 测试覆盖率(istanbul cover ./node_modules/mocha/bin/_mocha -- -t 2000 --recursive -R spec tests/)
istanbul cover ./node_modules/mocha/bin/_mocha tests/

配置文件

elite.conf.jsonc

  {
    "exported": "exported/dyn-export-xxx.zip",
    "extracted": "extracted",
    /* 解析输出路径 */
    "src": "src",
    /* 合成输出路径 */
    "target": "dist",
    /** 
    * 模式 
    * single 解析单文件,或者合成单文件 
    * all 全量
    */
    // "mode": "all",
    "mode": "single",
    /* 解析 dyn 源路径 单文件模式时需配置 */
    "dyn_path": "extract/动态页面/assume/(DSOJ9I)新增计划书.dyn",
    /* 合成 文件夹 源路径 单文件模式时需配置 */
    "json_path": ""
  }

目录结构

Dyn

|-- 动态页面
  |-- username
    |-- subFolder
      |-- yyy.dyn // file
    |-- xxx.dyn
|-- 组件
  |-- username
    |-- subFolder
      |-- zzz.dyn
    |-- aaa.dyn

Src

|-- 动态页面
  |-- username
    |-- subFolder
      |-- yyy.dyn // folder
        |-- cmds ······ // 同下dyn
    |-- xxx.dyn(dir)
      |-- cmds
        |-- cmds.json   // readonly 命令集同名,命令集结构 取出 js 的 content存入 下面为各行
        |-- internal // 系统事件 load active
          |-- load // 加载命令集
            |-- 1.js        // 900 脚本
            |-- 2.set.json  // 800 赋值 json模板,可能包含变量,如 "coverages": ${var.send_add_char}
            |-- 3           // 901 取自增ID 不需单独保存文件
            |-- 4.sql       // 902 数据库操作 CONTENT.sqls[id].content 注意参数
            |-- 5           //×903 用不到 CTI操作 软电话用
            |-- 6.post.json // 905 数据接口 只摘出payload
            |-- 7           //×906 用不到 动态表操作
            |-- 8           // 999 其他 不需单独保存文件
          |-- active // 激活命令集
            |-- ······
        |-- extend // 自定义命令集 
          |-- cmd-name // 纯js的命令集应该可以在编辑器新建,sql这种包含仓库id的需要在动态页面创建
            |-- cmd-name.json // readonly
            |-- ······
        |-- folder.json // 命令集分组 包含数据库id readonly
      |-- yyy.dyn // file dyn文件基本结构
      |-- pages.json // dyn 页面控件结构 元素事件 onPress onLongPress onPressIn onPressOut change before after onFocus onBlur onEndEditing
      |-- onPress // 元素事件对应目录
        |-- c1  // 控件名
          |-- 1.js // 控件事件命令集
          |-- ······
      |-- change ······ // 其他元素事件对应目录
      |-- temp.json // 页面变量声明
      |-- var.json // 组件变量声明
      |-- sqls.json // sql
|-- 组件
  |-- username
    |-- subFolder
      |-- zzz.dyn
    |-- aaa.dyn

Tips

  • 可以新增cmdItem: 需要调整文件名,并编辑对应的 cmds 或 pages 文件,sql类型需要的 guid 可以空着,guild时会自动生成
  • 需要遍历目录结构,所以读写文件用同步API处理