{"id":19969439,"url":"https://github.com/maelweb/gulp-wechat-weapp-src-alisa","last_synced_at":"2025-05-04T01:30:31.818Z","repository":{"id":48099739,"uuid":"171451030","full_name":"MaelWeb/gulp-wechat-weapp-src-alisa","owner":"MaelWeb","description":"Gulp plugin that lets you create custom aliases for wecaht weapp  with an @alias rule.","archived":false,"fork":false,"pushed_at":"2023-03-10T08:57:05.000Z","size":51,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-19T17:27:05.169Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaelWeb.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":"2019-02-19T10:09:07.000Z","updated_at":"2023-03-10T07:40:41.000Z","dependencies_parsed_at":"2022-08-12T18:40:16.705Z","dependency_job_id":null,"html_url":"https://github.com/MaelWeb/gulp-wechat-weapp-src-alisa","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/MaelWeb%2Fgulp-wechat-weapp-src-alisa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelWeb%2Fgulp-wechat-weapp-src-alisa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelWeb%2Fgulp-wechat-weapp-src-alisa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelWeb%2Fgulp-wechat-weapp-src-alisa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaelWeb","download_url":"https://codeload.github.com/MaelWeb/gulp-wechat-weapp-src-alisa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252276955,"owners_count":21722447,"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-11-13T02:50:05.605Z","updated_at":"2025-05-04T01:30:31.476Z","avatar_url":"https://github.com/MaelWeb.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 Wechat Weapp Src Alisa\u003c/h1\u003e\n  \u003cp\u003eGulp plugin that lets you create custom aliases for wecaht weapp  with an @alias rule. Supports  `.wxml`, `.wxss(less|scss)`, `.js(`ts|wxs`)` and `.json` file.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\n  npm i --save-dev gulp-wechat-weapp-src-alisa\n```\n\n\u003c!-- ```bash\n  yarn add --dev gulp-wechat-weapp-src-alisa\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-wechat-weapp-src-alisa');\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```\n// .js\nimport * as Utils from '@Aliases/utils/base';\nrequire('@Aliases/utils/base')\n\n// .(wxss|less|scss)\n@import '@Aliases/style/reset.less';\n\n.bg {\n  background-image: url('@Aliases/images/32821027.jpg');\n}\n\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```\n// .js\nimport * as Utils from 'path/to/your/folder/utils/base';\nrequire('path/to/your/folder/utils/base')\n\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// .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%2Fmaelweb%2Fgulp-wechat-weapp-src-alisa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaelweb%2Fgulp-wechat-weapp-src-alisa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaelweb%2Fgulp-wechat-weapp-src-alisa/lists"}