{"id":32486337,"url":"https://github.com/fefeding/gulp-jmtemplate","last_synced_at":"2026-01-12T05:55:59.899Z","repository":{"id":57257995,"uuid":"206820503","full_name":"fefeding/gulp-jmtemplate","owner":"fefeding","description":"jm-template的gulp 插件","archived":false,"fork":false,"pushed_at":"2019-09-25T07:15:14.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T05:50:44.714Z","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/fefeding.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":"2019-09-06T15:14:01.000Z","updated_at":"2019-09-25T07:15:16.000Z","dependencies_parsed_at":"2022-08-25T21:22:42.024Z","dependency_job_id":null,"html_url":"https://github.com/fefeding/gulp-jmtemplate","commit_stats":null,"previous_names":["fefeding/gulp-jmtemplate","jiamao/gulp-jmtemplate"],"tags_count":0,"template":false,"template_full_name":"fefeding/jm-template","purl":"pkg:github/fefeding/gulp-jmtemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefeding%2Fgulp-jmtemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefeding%2Fgulp-jmtemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefeding%2Fgulp-jmtemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefeding%2Fgulp-jmtemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fefeding","download_url":"https://codeload.github.com/fefeding/gulp-jmtemplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefeding%2Fgulp-jmtemplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":[],"created_at":"2025-10-27T05:50:04.918Z","updated_at":"2026-01-12T05:55:59.861Z","avatar_url":"https://github.com/fefeding.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 微模板引擎\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n\n\n模板引擎 [https://github.com/jiamao/jm-template](https://github.com/jiamao/jm-template)的`gulp`插件。\n\n可以用来做同构模板引擎。\n\n## Install\n\n```bash\n$ npm i gulp-jmtemplate --save\n```\n\n## Usage\n\n\n```js\n//gulpfile.js\nconst gulp = require('gulp');\nconst path = require('path');\nconst concat = require('gulp-concat');\nconst template = require('../index.js');\n\n\ngulp.task('default', ()=\u003e{\n\n  let stream = gulp.src('./templates/*.html', {\n    cwd: __dirname\n  });\n\n  return stream.pipe(template.precompile({\n      // 这里可以指定id规则，如果不指定会取文件名\n    id: function(opt) {\n        //opt.path\n      console.log(opt);\n    }\n  })).pipe(concat('user.js'))\n  .pipe(gulp.dest('templates'));\n}); \n```\n\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/gulp-jmtemplate.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/gulp-jmtemplate\n[download-image]: https://img.shields.io/npm/dm/gulp-jmtemplate.svg?style=flat-square\n[download-url]: https://npmjs.org/package/gulp-jmtemplate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffefeding%2Fgulp-jmtemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffefeding%2Fgulp-jmtemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffefeding%2Fgulp-jmtemplate/lists"}