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

@gmsoft/search-page-generator

v1.0.4

Published

自动生成SearchPage调用

Downloads

13

Readme

gm-spg

Fast init for SearchPage in everywhere.

Description

帮助快速创建 SearchPage 所需的相关代码、周边组件、数据模型声明。

Usage

  1. 创建默认 SearchPage 默认模板

    spg gen def [moduleName] [version]
    # 在执行目录下创建一个名为ContractManage的列表模块,使用的模板版本号为 v1
    # 将在命令运行目录下创建ContractManage文件夹,并写出相关文件
    spg gen def ContractManage v1
  2. 创建列表接口的 TS 声明文件

    spg gen api [--cover]
    # 将会读取项目根路径下的.easy-mock.js文件,并进入交互模式选择需要生成的Api组,生成的目标文件将存放在src/types/spg-type下
    spg gen api

    指定 --cover 选项,将会覆盖已经存在的同名接口文件。

    重要说明:接口文件的命名规则为:接口地址的最后两段转换为帕斯卡命名风格加上.d.ts,如:接口地址为:/how/are/you,则此接口对应的文件名为:AreYou.d.ts,如果你将要生成的接口组内存在在此规则下多个接口映射到同一个文件名,将导致错误!

  3. 创建状态渲染组件

    # 将在src/components/下创建Status渲染组件,主要配合带有状态渲染的模板使用
    spg gen status

Todo

  • [ ] 模板抽离
  • [x] 生成基础模板
  • [x] 生成接口模型声明

Question

  1. 生成接口声明文件是文件名重名问题
  2. 模板优化、模版与项目抽离

Author

和风柒月 @ 11/02/2021 01:26