{"id":18575543,"url":"https://github.com/echofly/gulp-weapp-alias","last_synced_at":"2026-05-02T02:34:34.139Z","repository":{"id":57259478,"uuid":"394207837","full_name":"echofly/gulp-weapp-alias","owner":"echofly","description":"Gulp plugin that lets you create custom aliases for wecaht weapp","archived":false,"fork":false,"pushed_at":"2024-10-12T09:35:52.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T10:43:58.919Z","etag":null,"topics":["aliases","gulp","gulp-plugin","weapp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echofly.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-09T08:17:03.000Z","updated_at":"2024-10-12T09:35:55.000Z","dependencies_parsed_at":"2025-04-29T08:01:06.110Z","dependency_job_id":"8862c1dc-f5b7-4d5e-8510-88b5ae241fbc","html_url":"https://github.com/echofly/gulp-weapp-alias","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/echofly/gulp-weapp-alias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echofly%2Fgulp-weapp-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echofly%2Fgulp-weapp-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echofly%2Fgulp-weapp-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echofly%2Fgulp-weapp-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echofly","download_url":"https://codeload.github.com/echofly/gulp-weapp-alias/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echofly%2Fgulp-weapp-alias/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32521082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aliases","gulp","gulp-plugin","weapp"],"created_at":"2024-11-06T23:20:11.626Z","updated_at":"2026-05-02T02:34:34.123Z","avatar_url":"https://github.com/echofly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://gulpjs.com\"\u003e\n    \u003cimg width=\"200\" height=\"200\"\n      src=\"https://upload.wikimedia.org/wikipedia/commons/7/72/Gulp.js_Logo.svg\"\u003e\n  \u003c/a\u003e\n  \u003ch1\u003eGulp Weapp Alias\u003c/h1\u003e\n  \u003cp\u003eGulp plugin that lets you create custom aliases for wecaht weapp  with an \u003ccode\u003e@alias\u003c/code\u003e rule. Supports \u003ccode\u003e.wxml\u003c/code\u003e, \u003ccode\u003e.wxss(less|scss)\u003c/code\u003e, \u003ccode\u003e.js\u003c/code\u003e and \u003ccode\u003e.wxs\u003c/code\u003e file.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\n  npm i gulp-weapp-alias -D\n```\n\n\u003c!-- ```bash\n  yarn add --dev gulp-weapp-alias\n``` --\u003e\n\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\n**gulpfile.js**\n```js\nconst { src, dest } = require('gulp');\nconst aliases = require('gulp-weapp-alias');\n\nfunction aliasTask() {\n    return src('src/*.{wxss|less|scss|wxml|js}')\n        .pipe(aliases({\n            '@Aliases': \"path/to/your/folder\",\n        }))\n        .pipe(dest('dist'));\n}\n```\n\nthe file before compilation\n\n```js\n// .js\nimport * as Utils from '@Aliases/utils/base';\nrequire('@Aliases/utils/base')\n```\n```less\n// .(wxss|less|scss)\n@import '@Aliases/style/reset.less';\n\n.bg {\n  background-image: url('@Aliases/images/32821027.jpg');\n}\n```\n```html\n// .wxml\n\u003cimport src=\"@Aliases/wxs/index.wxs\" /\u003e\n\n\u003cimage src=\"@Aliases/images/32821027.jpg\" mode=\"cover\"\u003e\u003c/image\u003e\n\n```\n\nwill become:\n\n```js\n// .js\nimport * as Utils from 'path/to/your/folder/utils/base';\nrequire('path/to/your/folder/utils/base')\n```\n```less\n// .(wxss|less|scss)\n@import 'path/to/your/folder/style/reset.less';\n\n.bg {\n  background-image: url('path/to/your/folder/images/32821027.jpg');\n}\n```\n```html\n// .wxml\n\u003cimport src=\"path/to/your/folder/wxs/index.wxs\" /\u003e\n\n\u003cimage src=\"path/to/your/folder/images/32821027.jpg\" mode=\"cover\"\u003e\u003c/image\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechofly%2Fgulp-weapp-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechofly%2Fgulp-weapp-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechofly%2Fgulp-weapp-alias/lists"}