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

hasaki

v0.0.4

Published

A file generator for easy writing your application.

Readme

Hasaki node version

A simple file generator for all exist projects.

Installation

Prerequisites: Node.js ( >= 5.8.0 preferred ). 4.x should also work, but we haven't test it yet.

$ npm install -g hasaki

Usage

In your project root directory

$ hasaki init

If you want to use default configuration, you can use

$ hasaki init -y

to generate a default .hasakirc file.

see more information by use

$ hasaki -h

Create files

After get your .hasakirc file, simply run

$ hasaki create <page-name> <rule-name><,rule-name2>...

it will automatically create some <page-name> files according to your <rule-name> configuration. You can apply

multi <rule-name> by set them one by one. Or create a new rule and put all the target rule into an array. We call

this a rule group.

.hasakirc

.hasakirc is hasaki config file, it will automatically generate when you use hasaki init . But you can also

write or modify the whole file manually. Make sure the content type should be json.

configuration fields

  • name Project name, default value a hasaki project.

  • templateRootPath A path value. It's useful when you use template field in rules, default value ./_template.

  • placeholder You can set this value to add a placeholder in your template file. hasaki will look for your template

file and replace all the placeholder to the <page-name> which you've set in hasaki create <page-name> <rule-name>. The default

value is __name。 In some case, you can set it to __Name or __NAME。 When placeholder's first letter is uppercase

the <page-name>'s first letter will set to uppercase. So it's easy to see __NAME will make the whole <page-name> become

uppercase.

  • rules type Array
    • ruleName type Object, A name for your current rule.

      • extension the extension for the target file.

      • suffix the suffix for the target file.

      • prefix the prefix for the target file.

      • path the path where the target file will be.

      • template the path for your template file. If it's value is not "", content field will be ignore.

      • content default content for target file contain.

    • ruleGroup type Array. You can put your single rule into an array, and named it a new rule. This is very useful

when you want to generate multi files.

Default .hasakirc

Our default .hasakirc looks like

{
  "name": "a hasaki project",
  "templateRootPath": "./_template",
  "placeholder": "__name",
  "rules": [
    {
      "containerRule": {
        "extension": "js",
        "suffix": "",
        "prefix": "_",
        "path": "./container/",
        "template": "container.js"
      }
    },
    {
      "actionRule": {
        "extension": "js",
        "suffix": "",
        "path": "./actions/",
        "template": "action.js"
      }
    },
    {
      "sagaRule": {
        "extension": "js",
        "suffix": "saga",
        "path": "./saga/",
        "content": "haha"
      }
    },
    {
      "rule3": [
        "actionRule",
        "sagaRule",
        "containerRule"
      ]
    }
  ]
}

Contribution

请在提交 PR 前阅读我们的贡献指南

License

MIT