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

df-build-cli

v1.0.9

Published

dfcous 打包脚手架

Downloads

9

Readme

dfocus打包脚手架

首先要用这个cli打包,项目需要稍作改动

1.需要在项目根目录下,新建base.json文件,如下

image.png

2.在src 下面的utils里面的env.js 改动如下代码

image.png

3.utils 里面的 config.js的base取值需改动,如下

image.png ,

4.  根目录下面的.roadhogrc.js里面的base取值方式,也需改动

image.png

注意

1,2步骤,所有项目都要这样改动,但是3,4步骤,需要结合自己实际项目进行改动

比如UMI项目,只需改动.umirc.js|ts 如下

image.png

安装

npm i df-build-cli --save-dev

然后,在package.json的scripts里面加入

"build:prod": "dfb"

然后打包

npm run build:prod

运行时有三个参数需要输入,INJECTED_MODULE,NODE_TITLE ,BASE

INJECTED_MODULE 比如  ads

NODE_TITLE 比如 DMEETING_PC

BASE 比如 /meeting/

效果图如下

avatar

当然,如果不需要改动这个三个参数的话,就一路回车,使用默认值

这个脚手架为啥会出现

  • 1.js写的大家都能维护,反正我对shell语法不感冒,虽然shell很简洁

  • 2.有时间私有化部署的时候,用户不让部署到/目录下面,这样我们就需要手动改base,然后改动很少,但是改动,就意味你动了源码,有风险

  • 3.有时间需要更改node title 我要更改两个地方,pkg里面要改动,shells文件下面的stop.sh 也需要改动,风险点和第二点一样

changelog

  • 1.0.9 版本,加入本地打包后,上传到指定服务器,并且启动相应的脚本