{"id":22433839,"url":"https://github.com/gavinning/fis-parser-relace-path","last_synced_at":"2025-03-27T07:46:19.464Z","repository":{"id":32904378,"uuid":"36499179","full_name":"gavinning/fis-parser-relace-path","owner":"gavinning","description":"替换源码文件中的自定义组件路径","archived":false,"fork":false,"pushed_at":"2015-05-29T11:04:58.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T12:46:44.891Z","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":"gpl-3.0","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-29T11:03:00.000Z","updated_at":"2015-05-29T11:04:59.000Z","dependencies_parsed_at":"2022-07-22T04:32:07.760Z","dependency_job_id":null,"html_url":"https://github.com/gavinning/fis-parser-relace-path","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-parser-relace-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-parser-relace-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-parser-relace-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Ffis-parser-relace-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinning","download_url":"https://codeload.github.com/gavinning/fis-parser-relace-path/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806392,"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:16:02.156Z","updated_at":"2025-03-27T07:46:19.430Z","avatar_url":"https://github.com/gavinning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fis-parser-replace-path\n\n----\n\n#### 替换源码文件中的自定义组件路径\n\n```\nnpm install fis-parser-replace-path -g\n```\n\n\n```\n// example 1\n// fis setting\nfis.config.set('modules.parser.jade', ['replace-path']);\nfis.config.set('settings.parser.replace-path', {\n    extname: 'jade',\n    // 默认查询include和extends，可覆盖\n    query: ['include', 'extends'],\n    replace: {\n        \"common\": \"Modules\"\n    }\n});\n\n// index.jade\nextends common:layout \t\t\t\t=\u003e extends Modules/layout/layout.jade\ninclude common:header \t\t\t\t=\u003e include Modules/header/header.jade\ninclude common:header.test \t\t\t=\u003e include Modules/header/header.test.jade\ninclude common:nav.jade \t\t\t=\u003e include Modules/nav/nav.jade\ninclude common:nav/nav.jade \t\t=\u003e include Modules/nav/nav.jade\ninclude common:nav/nav-live.jade \t=\u003e include Modules/nav/nav-live.jade\n```\n\n```\n// example 2\n// fis setting\nfis.config.set('modules.parser.jade', ['replace-path']);\nfis.config.set('settings.parser.replace-path', {\n    query: ['include'],\n    replace: {\n        \"common\": \"Modules/src\"\n    }\n});\n\n// index.jade\nextends common:layout \t\t\t\t=\u003e extends common:layout\ninclude common:header \t\t\t\t=\u003e include Modules/src/header/header\ninclude common:header.test \t\t\t=\u003e include Modules/src/header/header.test\ninclude common:nav.jade \t\t\t=\u003e include Modules/src/nav/nav.jade\ninclude common:nav/nav.jade \t\t=\u003e include Modules/src/nav/nav.jade\ninclude common:nav/nav-live.jade \t=\u003e include Modules/src/nav/nav-live.jade\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Ffis-parser-relace-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinning%2Ffis-parser-relace-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Ffis-parser-relace-path/lists"}