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

ihot

v0.0.2

Published

a simple hot restart

Downloads

14

Readme

ihot

A simple hot start (abbreviated as ihot). Simple, it's because only do one thing, listen for file changes, and restart the execution command

use

npx  ihot

Using configuration files

Can configure files such as' miconfig.json ',' miconfig.ts', and 'miconfig.js' to configure hot values for heating updates

If both configurations exist, the final configuration will be '.json'. If there is no '.json' file, the final configuration will be '.js' file

create profile

Create a configuration file using the init command


npx ihot init # Independently selecting configuration files
npx ihot init JSON # Use JSON to configure format files
npx ihot i -n # Use JSON to configure format files
npx ihot init js # Use js to configure format files
npx ihot i -j # Use JavaScript to configure format files
npx ihot init ts # Use ts to configure format files
npx ihot i -t # Use ts configuration format file

You can use - h to view specific usage and their abbreviations

JSON format configuration file

{
  "hot": {
    /***  base */
    "base": "..",
    /**  cwd   */
    // "cwd": "",
    /**  Hot start-up listening files */
    "watch": "ihot",
    /**
     * Default not listening to   *\/lib, *\/cjs, and *\/es
     * packaged content,can be changed according to actual situation
     */
    "skip": ["exportCjs", "exportMjs", "exportTypes"],
    /**  Command used  */
    "code": "npx lmssee",
    /**
     *  The parameters passed in can be directly placed into
     *  the code attribute.
     *  After executing the command, pay attention to the order
     */
    "args": ["-al"],
    /** Other commands that need to be executed before executing  */
    "beforeReStart": {
      "ihot": "npm  run build "
    }
  }
}

JS format configuration file

/**  Do not add non commented content outside the function body  */
// see in  https://github.com/lmssee/ihot/blob/main/%E8%87%AA%E8%BF%B0%E6%96%87%E4%BB%B6.md#配置说明
() => ({
  //  热启动相关配置
  hot: {
    // 监听文件的相对路径(这里不影响 \`cwd\` 路径, cwd 依旧相对于配置文件目录 )
    base: '..',
    // 监听的文件/夹,但他们内部文件变化,可触发再次启动
    watch: ['ihot'],
    // 打包编译文件,不监听以下文件内文件变化
    skip: ['exportCjs', 'exportMjs', 'exportTypes'],
    // 启动 \`code\` 的相对目录,可以为空
    // "cwd": ".",
    // 执行的具体的命令
    code: 'node  ./index.js',
    // 启动时赋予 \`code\` 的参数
    args: ['-v'],
    // 监听变化后,相对目录在再次启动前执行的命令
    // 这个属性应与 \`watch\` 元素相同
    beforeRestart: {
      ihot: 'npm  run build',
    },
  },
});

TS format configuration file

/**  Do not add non commented content outside the function body  */
// 配置项 https://github.com/lmssee/ihot/blob/main/%E8%87%AA%E8%BF%B0%E6%96%87%E4%BB%B6.md#配置说明
() => ({
  //  热启动相关配置
  hot: {
    // 监听文件的相对路径(这里不影响 \`cwd\` 路径, cwd 依旧相对于配置文件目录 )
    // "base": ".",
    // 监听的文件/夹,但他们内部文件变化,可触发再次启动
    watch: ['.', 'src'],
    // 打包编译文件,不监听以下文件内文件变化
    skip: ['out', 'types'],
    // 启动 \`code\` 的相对目录,可以为空
    // "cwd": ".",
    // 执行的具体的命令
    code: 'node  ./index.js',
    // 启动时赋予 \`code\` 的参数
    args: ['-v'],
    // 监听变化后,相对目录在再次启动前执行的命令
    // 这个属性应与 \`watch\` 元素相同
    beforeRestart: {
      src: 'npm  run build',
    },
  },
});

If during startup, except for npx ihot (non global installation) and ihot (global installation), which have parameters after startup, the configuration file will be directly overwritten

Configuration Description

watch : listening object

watch is the file or folder to listen to, defaulting to ., The current hot restart path. Can be changed by oneself

  watch : "cli"

If you want to listen to multiple folders, you can use arrays to modify the default values

  watch: ["cli", "tools"]

skip : Ignored files

skip Configure files that ignore listening If the build file is not included, it may cause an infinite loop: clean ->build ->clean ->build

If you have any questions, you can directly submit question