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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dark-tunnel

v1.0.4

Published

cli for web

Downloads

26

Readme

NPM version NPM package

dark-tunnel前端构建工具

此工具用来快速初始化前端项目模板,避免繁琐的重复配置

支持的项目模板

  1. sophic-template 此为sophic微前端框架的子应用模板
  2. sophic-master-template 此为sophic微前端框架的主应用模板
  3. dark-tunnel-base-template 此为dark-tunnel的react应用模板
  4. ewchart-base-template 此为ewchart的示例模板
  5. 更多模板待开发...

模板下载示例

mkdir reactDemo
cd reactDemo
dark init dark-tunnel-base-template
npm install
npm start

支持的命令

dark --help
dark run 运行项目或者编译项目
dark run --help 查看此命令参数
  -m 指定编译模式 Dev | Pro
  -url 指定 PUBLIC_URL
  -c 开启运行时检查
  -r 开启px转换成rem
  -H 开启HTTPS
  -h 设置开发环境的HOST
示例:
  开发:dark run -m Dev -h emonitor.local.elenet.me -H -url /
  生产:dark run -m Pro -url /

dark init 下载项目模板
示例:
  dark init sophic-template

代理配置

项目根目录新建proxy.js文件

module.exports = {
  "/api1": 'https://target-ip:8080' // 代理 /api1 请求 https://target-ip:8080/api1
  "/api2": {
    target: 'http://target-ip:3000',
    pathRewrite: {'^/api' : ''} // 代理 /api2 请求 https://target-ip:3000/
  }
}

别名配置

项目根目录新建alias.config.js文件

const path = require('path');
module.exports = {
  $components: path.resolve('./src/component/'),
  $asset: path.resolve('./src/asset'),
};

静态文件

项目根目录的static文件夹中的文件最终会被复制到build文件夹中

html模板变量

使用了InterpolateHtmlPlugin对 %PUBLIC_URL% 变量进行替换