white-brand-cli
v1.2.4
Published
Helps you remove and replace everything related to all private brands. It's up to you to remove what information to remove and what new brand to add.
Readme
white-brand-cli
Helps you remove and replace everything related to all private brands. It's up to you to remove what information to remove and what new brand to add.
Install
yarn add -D white-brand-cliUsage
- wb -v --version # show version
- wb -h --help # show help
- wb -c --config [config file path] # exec with custom configuration file
- wb # exec with a default config configuration
### Configuration
default configuration file
Add a .js file named white-brand.config.js to the root of your project.
This path is the default value of the configuration file, and executing this command wb will automatically read the file.
yarn wbcustom configuration file
You should use this parameter --config(-c) to use your custom configuration file path and file name.The file path should be relative to the root directory of your project. It should satisfy the condition that it must be a js file.
yarn wb -c ./config/wb-config.jsConfiguration file example:
module.exports = {
modules:[
"./test"
],
rule:[
// 匹配越模糊的放的位置需要越靠下,避免影响精准匹配
{origin:/\"[a-z0-9\-_\.]+\.agora.io\"(,\s*)?/, occupy:""},
{origin:/\"[a-z0-9\-_\.]+\.sd-rtn.com\"(,\s*)?/, occupy:""},
{origin:"AgoraRTC", occupy:"WwwwWWW"},
{origin:"agora-rtc", occupy:"wwwww-www"},
{origin:"agora", occupy:"wwww"},
{origin:"Agora", occupy:"Wwww"},
{origin:"声网", occupy:"白牌"},
],
// After packaging, the directory has a subdirectory set to "hierarchy", otherwise it is set to "flat",
// you can also leave this parameter unchecked, the default value is "flat".
structure:"hierarchy" // OR "flat"
}If you do not actively copy package.json to the packaging directory during packaging, the plugin will automatically copy the package.json from the configured modules directory. Currently, only package.json, /.js, /.d.ts file contents are processed.
Other files only handle file names (excluding suffix names) do not process content,
if there is a need to process the content of these files please contact me @anzhaowei to upgrade the plugin.
Other
Check library version
yarn wb --versionOR
yarn wb -vHelp
yarn wb --helpOR
yarn wb -h