{"id":22433547,"url":"https://github.com/gavinning/fis-postpackager-replace","last_synced_at":"2025-03-27T07:45:35.735Z","repository":{"id":57237075,"uuid":"37441741","full_name":"gavinning/fis-postpackager-replace","owner":"gavinning","description":"用于合并后字符串替换需求，例如某些场景下绝对路径向相对路径替换","archived":false,"fork":false,"pushed_at":"2015-06-15T03:40:50.000Z","size":112,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T02:37:17.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavinning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-15T03:39:32.000Z","updated_at":"2017-01-09T08:07:13.000Z","dependencies_parsed_at":"2022-08-26T15:10:15.209Z","dependency_job_id":null,"html_url":"https://github.com/gavinning/fis-postpackager-replace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-postpackager-replace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-postpackager-replace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-postpackager-replace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-postpackager-replace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinning","download_url":"https://codeload.github.com/gavinning/fis-postpackager-replace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806389,"owners_count":20675296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T22:15:16.727Z","updated_at":"2025-03-27T07:45:35.711Z","avatar_url":"https://github.com/gavinning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fis-postpackager-replace\n\n----\n本插件将会根据配置替换字符串，适用于打包规则\n\n```\nnpm install fis-postpackager-replace -g\n```\n\n\n```\nfis.config.merge({\n\tmodules: {\n\t\t// 启用插件\n\t\tpostpackager: ['replace']\n\t},\n\tsettings: {\n\t\tpostpackager: {\n\t\t\t// 插件配置\n\t\t\treplace: {\n\t\t\t\t// 打包规则\n\t\t\t\t'/css/home.css': {\n\t\t\t\t\t// 替换规则\n\t\t\t\t\t// 'string[|正则修饰符]': string\n\t\t\t\t\t\n\t\t\t\t\t// 纯字符串替换，将123替换为456\n\t\t\t\t\t'123': '456',\n\t\t\t\t\t'123|gi': '456',\n\n\t\t\t\t\t// 绝对路径替换为相对路径，部分特殊字符需要使用\\\\进行转义，例如(\n\t\t\t\t\t'url\\\\(/images/|gi': 'url(../images/'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n})\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Ffis-postpackager-replace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinning%2Ffis-postpackager-replace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Ffis-postpackager-replace/lists"}