
Security News
The AI Industry Is Betting on Open Weights
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.
@huxy/pack
Advanced tools
@huxy/pack 是一个项目构建工具,集成了 esbuild、eslint、stylelint、jest、commitlint、husky、standard-version、postcss、prettier,提供开发环境、构建打包、本地启动服务、环境配置、代理配置等功能。使用简单方便,功能齐全,配置灵活,可自己添加需要的功能插件。
@huxy/pack 是一个项目构建工具,集成了 esbuild、eslint、stylelint、jest、commitlint、husky、standard-version、postcss、prettier,提供开发环境、构建打包、本地启动服务、环境配置、代理配置等功能。使用简单方便,功能齐全,配置灵活,可自己添加需要的功能插件。
运行时会自动生成插件配置文件,如 babel.config.js 文件等,可自行修改覆盖。
生成项目配置文件 .huxy/app.configs.js ,用户自行配置即可。
用户环境配置:
const app = {
// entry: 'app', // 项目入口目录,默认 app 文件夹
// HOST: 'http://localhost', // 本地运行
PORT: 8080, // 本地开发环境端口
PROD_PORT: 8081, // 本地生产环境端口
PUBLIC_DIR: 'public', // public 文件路径
BUILD_DIR: 'build', // 构建产物路径
DEV_ROOT_DIR: '/', // 开发环境 basepath
// PROD_ROOT_DIR: '/huxy', // 生产环境 basepath
projectName: 'XX平台', // 名称,页面初始化 title
/* PROXY: { // 代理配置
target: 'http://127.0.0.1:9000',
prefix: '/api',
}, */
envConfigs: { // 全局环境变量
name: '项目名',
_id: '其它属性',
},
};
const webpack = { // webpack 配置
// ... // 基础配置
dev: { // 开发环境配置
// ...
},
prod: { // 生产环境配置
// ...
},
};
const nodeServer = (config, app) => { // 本地 nodejs 服务配置
app.get('/local/test', (req, res, next) => {
console.log(req);
});
};
export default {
app,
webpack,
nodeServer,
};
// 例如
export default {
app,
webpack: (rootPath, appPath) => ({
resolve: {
alias: {
'@huxy': `${rootPath}/playground/huxy`,
},
},
prod: {
copy: [ // 拷贝文件
{
from: `${appPath}/public/robots.txt`,
to: `${appPath}/build/robots.txt`,
},
],
buildConfigs: {
target: 'es2018',
minify: true,
},
},
}),
};
webpack 配置项可以是一个配置对象,也可以是一个带有 rootDir 和 appPath 的回调函数。当要使用到路径时,请使用回调函数来获取根目录路径和 app 路径。
"start": "pack start",
"build": "pack run build",
"analyze": "pack run analyze",
"server": "pack run server",
"test": "pack run test",
其它 npm 命令:
"eslint": "pack eslint 'app/**/*.{js,jsx}'", // 或直接使用 eslint
"eslint-common": "eslint 'common/**/*.{js,jsx}'",
"stylelint": "stylelint 'app/**/*.{css,less}'",
"lint-fix": "eslint --fix 'app/**/*.{js,jsx}' && stylelint --fix 'app/**/*.{css,less}'",
"prettier": "prettier 'app/**/*' --write --ignore-unknown",
"release": "standard-version"
新建一个项目,创建 public 和 app 目录。
index.html 和 favicon 等。可使用 app.configs 里面的 PUBLIC_DIR 来配置路径,默认 public 放在 app 目录里面。src,在配置文件里配置 entry: 'src' 即可。安装 @huxy/pack
npm i -D @huxy/pack
然后在 package.json 里面创建上面运行命令里的 scripts ,就可运行了。
版本 0.6+ 使用了 esmodule,只需在 package.json 里面设置 "type": "module" 即可。
v2.0.0 使用了 huxy-server 服务,也可自行使用 huxy-server 来创建服务,详情请查看 huxy-server 。
FAQs
@huxy/pack 是一个项目构建工具,集成了 esbuild、eslint、stylelint、jest、commitlint、husky、standard-version、postcss、prettier,提供开发环境、构建打包、本地启动服务、环境配置、代理配置等功能。使用简单方便,功能齐全,配置灵活,可自己添加需要的功能插件。
The npm package @huxy/pack receives a total of 388 weekly downloads. As such, @huxy/pack popularity was classified as not popular.
We found that @huxy/pack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.