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 🙏

© 2026 – Pkg Stats / Ryan Hefner

soul-archetype-template

v0.1.1

Published

承泽SA template工具

Readme

SA template

承泽SA template工具

根据指定的模板在指定的路径下创建文件或追加内容

安装

node6+

npm install -D soul-archetype-template

##引入项目

import {generateFile} from 'soul-archetype-template';

##使用

#生成文件
generateFile(templateName, keyWord, config);


1.templateName(string) 模板名称,必须,
    支持'menu', 'route', 'page', 'redux-module', 'reducers', 'table', 'table-all', 'route-all', 'menu-all';

2.keyword(string) 关键字,必须,小写,


3.config(object): 配置项,必须
    无配置时传{},
    projectType(string): 项目类型,可选,  支持'react-antd', 'angular', 默认'react-antd';
    dataModel(object): 数据模型,  部分模板为必填项, 详见数据模型介绍

##模板

一、react-antd
    1.menu 追加导航栏
        无配置项

    2.route 追加路由
        无配置项

    3.reducers 追加reducers
        无配置项

    4.page 增加单个page文件(无路由,无组件)
        无配置项

    5.redux-module 增加单个redux-module文件
        无配置项

    6.table 生成简单table组件(包括redux)
        项目结构须和sa生成项目一致;
        必须配置dataModel;

    7.menu-all 生成导航栏、路由、页面
        项目结构须和sa生成项目一致;
        无配置项

    8.route-all 生成路由、页面
        项目结构须和sa生成项目一致;
        无配置项

    9.table-all 生成导航栏、路由、页面、table组件(含redux)
        项目结构须和sa生成项目一致;
        必须配置dataModel;


二、angular
暂无模板

##数据模型

#用于动态生成文件
    主要用于form,table中获取数据,展示数据;
    以key-value的形式,可放置多个键值对;

    例:{
          "name": {
            "label": "名字",
            "type": "text"
          },
          "sex": {
            "label": "性别",
            "type": "radio",
            "values": ["男", "女"]
          }
        }

    key为唯一识别字,自定义,用于获取数据,上例中, 'name', 'sex' 为key;
    label为中文解释,必须;
    type为类型,必须,支持'text', 'number', 'radio'等;