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

zumen

v1.0.17

Published

Zumen is a command line tool. A development tool that can create a group of files at once based on the design described in json (or yaml) [![CICD](https://github.com/trysd/npm-zumen/actions/workflows/release.yml/badge.svg)](https://github.com/trysd/npm-

Downloads

7

Readme

Zumen

Zumen is a command line tool.
A development tool that can create a group of files at once based on the design described in json (or yaml) CICD

usage

Install the design set with the init command.

  npx zumen@latest init

Next, customize the design set and run basic commands.

  npx zumen@latest

Add the -o option to overwrite the output file.
Be careful, as the finished file that you manually customized will be reverted.

  npx zumen@latest -o

preview of final structure "-p" option preview the final system-interpreted structure.

  npx zumen@latest -p

Detailed usage

  1. Create a drawing file (zumen.json) directly under the project.
  2. Create a template file (**..ejs) in ./zumen/
  3. run command 'npx zumen@latest'

1. Drawing file

Place the drawing file (zumen.json or zumen.yml, zumen.yaml) that describes the files to be created directly under the project.

Drawing file contents

Describe the file structure in the drawing file. For folders, add / at the end of the item name, and for files, the item name will be "template name"="file name". See the example for details. (The right hand side of "=" is a string that will later be used in templates and to replace {name} in filenames.)

zumen.json(or zumen.yaml, zumen.yml)

{
  "src/": {
    "components/": {
      "template01=dialogComponent": {
        "comment": "the comment"
      }
    }
  }
}
  • Item names and values in the file are basically arbitrary and can be expanded as ejs in the template. (However, the name and path are added implicitly, so even if you specify them, they will be overwritten by the system.)
  • For other detailed explanations, please refer to "Special function".
  • how to use ejs https://ejs.co/#docs

2. How to create template file

Create the template described in the drawing file. The template name is arbitrary, but must match the field name with equals. In the example above, you need to create a template called "template01".

template01 sample

filename: ./zumen/template01={name}.tsx.ejs

// <%= comment %>
const <%= name %> = () => {
  return (
    <div>
      I'm <%= name %>
    </div>
  );
}
  • Make sure the file extension is ".ejs"
  • {name} replaces the right side of equals specified in the drawing file.
  • The template is finally compiled with ejs.

final deliverable

src/components/dialogComponent.tsx

// the comment
const dialogComponent = () => {
  return (
    <div>
      I'm dialogComponent
    </div>
  );
}

Special function

value annotation

If you specify "@{template name}" as the value of the item to expand, it will return a list of target file names in the specified hierarchy and will be replaced with a complete array in the template.

example

zumen.json
{
  "src/": {
    "components/": {
      "component=DialogOpen": {
        "comment": "Dialog open button."
      },
      "component=DialogClose": {
        "comment": "Dialog close button."
      },
      "index=": {
        "brings": "@component"
      }
    }
  }
}
  • Can also be set like "../@component" with hierarchy specified.
./zumen/index=index.ts.ejs
<%_ for (var i = 0; i < brings.length; i++) { _%>
export * from './<%= brings[i].name %>';
<%_ } _%>

####  File completed with the above set

./src/components/index.ts
export * from './DialogOpen';
export * from './DialogClose';

Items that are automatically and implicitly granted

You can use the file name "name" and the file path string "path" in the template.