zyd-server-build
v1.0.43
Published
基于uglify-js的js混淆build库
Downloads
53
Readme
zyd-server-build
Installation
$ npm install -s zyd-server-build
Quickstart
/build.js
const zsb = require("zyd-server-build")
zsb()
Options
/build.js
const zsb = require("zyd-server-build")
zsb({
src: "..", // 源文件夹, . 代表当前目录, .. 代表上级目录
dst: "../build", // 目标文件夹, . 代表当前目录, .. 代表上级目录
noBuildFile: ["../server/config/index.js"], // 不需要混淆压缩的文件(完整路径),文件路径前需要包含src的内容,如实例,会被无改动打包到目标文件夹中
noBuildDir: ["../server/public/js"]. // 不需要混淆压缩的文件夹(完整路径),文件路径前需要包含src的内容,如实例,会被无改动打包到目标文件夹中
ignoreDir: [ // 需要忽略的文件夹(完整路径),文件夹路径前需要包含src的内容,如实例,忽略后不会被打包到目标文件夹中
"../.git",
"../server/node_modules",
],
ignoreFile: ["../.gitmodules"], // 需要忽略的文件(完整路径),文件路径前需要包含src的内容,如实例,忽略后不会被打包到目标文件夹中
noDeleteDir: [".git", "node_modules"], // 需要忽略删除的文件或文件夹,默认:[".git", "node_modules"]
copyright: "Powered by zydsoft™", // 版权申明
})