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

nowa-gui-plugin-demo

v1.0.3-beta.4

Published

## 插件结构

Downloads

3

Readme

Nowa 可视化插件 demo

插件结构

|- index.js   模块清单
|- pretask.js 预执行任务
|- promts.js  提问模板
|- tasks.js   主任务文件
|- .nowa      属性配置文件
|- package.json
|- readme.md

模块中包含四部分,name & promts & tasks & pretask

  • name 必须 表单名字
  • pretask 可选 预执行任务
  • promts 可选 提问模板
  • tasks 必须 主任务队列

执行顺序

插件执行流程为 pretask -> promts -> tasks

如果希望用户填写信息然后执行任务,可以使用 promts 配置表单信息。

如果希望用户表单内容是通过其他代码获取数据才能渲染的,可以使用 pretask

具体请看每个文件的注释。

.nowa 配置文件

在插件运行时外的一份配置文件,用来表示插件的特征,这不应该是通过 promts 得到的答案。

后期会在nowa中可视化显示。

提交

写好插件之后请使用 tnpm || npm 提交。

如何测试

可以联系我测试,提issue 或者手动测试,比较麻烦。

以下是手动测试的步骤。

  1. 提交一个 nowa-gui 的测试列表到 npm

这个包可以命名为 my-nowa-gui-plugins

package.json 中增加plugins字段:

{
  ...,
  "plugins": [
    {
      "name": "@ali/plugin-name", // 内网使用的名字
      "type": "ui",
      "origin": "ali"
    },
    {
      "name": "plugin-name", // 外网使用的名字
      "type": "ui",
      "origin": "common"
    }]
  }
  1. fork 或者 clone nowa-gui 的源码

https://github.com/nowa-webpack/nowa-gui

找到 src/renderer/models/plugin.js 中的 nowa-gui-plugins 更换为 my-nowa-gui-plugins

那么启动 gui 的时候,可以在设置页面中的插件设置里面看到 my-nowa-gui-plugins里面列出来的组件。

项目详情页面基础操作区域会出现 ... 的更多按钮,用户可以开始测试了。