{"id":17641649,"url":"https://github.com/rogeriopvl/gulp-mustache","last_synced_at":"2025-10-29T09:27:25.891Z","repository":{"id":13040866,"uuid":"15720734","full_name":"rogeriopvl/gulp-mustache","owner":"rogeriopvl","description":"〰 A gulp plugin that renders mustache templates","archived":false,"fork":false,"pushed_at":"2022-12-30T17:13:51.000Z","size":286,"stargazers_count":45,"open_issues_count":21,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T14:05:38.620Z","etag":null,"topics":["gulp","gulp-plugin","javascript","mustache"],"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/rogeriopvl.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":"2014-01-08T00:14:06.000Z","updated_at":"2024-05-22T22:35:31.000Z","dependencies_parsed_at":"2023-01-13T17:16:07.145Z","dependency_job_id":null,"html_url":"https://github.com/rogeriopvl/gulp-mustache","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-mustache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-mustache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-mustache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-mustache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogeriopvl","download_url":"https://codeload.github.com/rogeriopvl/gulp-mustache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252495269,"owners_count":21757228,"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":["gulp","gulp-plugin","javascript","mustache"],"created_at":"2024-10-23T07:07:26.213Z","updated_at":"2025-10-29T09:27:20.829Z","avatar_url":"https://github.com/rogeriopvl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-mustache [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]\n\n\u003e mustache plugin for [gulp](https://github.com/wearefractal/gulp)\n\n## Usage\n\nFirst, install `gulp-mustache` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-mustache\n```\n\nThen, add it to your `gulpfile.js`:\n\n```javascript\nvar mustache = require(\"gulp-mustache\");\n\ngulp.src(\"./templates/*.mustache\")\n\t.pipe(mustache({\n\t\tmsg: \"Hello Gulp!\"\n\t}))\n\t.pipe(gulp.dest(\"./dist\"));\n```\n\nYou may also pass in an object representing mustache partials and their contents\nas a third argument to the call to `mustache()` like so:\n\nWith key/value pairs:\n\n```javascript\ngulp.src(\"./templates/*.mustache\")\n\t.pipe(mustache({\n\t\tmsg: \"Hello Gulp!\",\n\t\tnested_value: \"I am nested.\",\n\t\tanother_value: \"1 2 3\"\n\t},{},{\n\t\tsome_inner_partial: \"\u003cp\u003e{{nested_value}}\u003c/p\u003e\",\n\t\tanother_partial: \"\u003cdiv\u003e{{another_value}}\u003c/div\u003e\"\n\t})).pipe(gulp.dest(\"./dist\"));\n```\nWith a json file:\n\n```javascript\ngulp.src(\"./templates/*.mustache\")\n\t.pipe(mustache('your_json_file.json',{},{}))\n\t.pipe(gulp.dest(\"./dist\"));\n```\n\n## Partials loaded from disk\n\n[Mustache partials](https://mustache.github.io/mustache.5.html#Partials) not given in the `partials` argument will be loaded from disk, relative from the file currently being processed:\n\n```\n{{\u003e ../partials/head }}\n```\n\nThis will find a `head.mustache` in the partials directory next to the current file's directory. Partials loading is recursive.\n\n## API\n\n### mustache(view, options, partials)\n\n#### view\nType: `hash` or `string`\nDefault: `undefined`\n\nThe view object, containing all template variables as keys. If you pass a `string` it will be used as the path to a JSON file containing view variables.\n\nAs of `v1.0.1`, `file.data` is supported as a way of passing data into mustache. See [this](https://github.com/colynb/gulp-data#note-to-gulp-plugin-authors).\n\n#### options\nType: `hash`\nDefault: `{ }`\n\nThe options object to configure the plugin.\n\n##### options.extension\nType: `string`\nDefault: the extension of the current file\n\n##### options.tags\nType `Array`\nDefault `undefined`\n\nPass custom mustache delimiters. This must be an Array of strings where the first item is the opening tag and the second the closing tag.\n\nExample:\n\n```javascript\n['{{custom', 'custom}}']\n```\n\n#### partials\nType: `hash`\nDefault: `{ }`\n\nAn optional object of mustache partial strings. See [mustache.js](https://github.com/janl/mustache.js/) for details on partials in mustache.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n\n[npm-url]: https://npmjs.org/package/gulp-mustache\n[npm-image]: https://badge.fury.io/js/gulp-mustache.png\n\n[travis-url]: http://travis-ci.org/rogeriopvl/gulp-mustache\n[travis-image]: https://secure.travis-ci.org/rogeriopvl/gulp-mustache.png?branch=master\n\n[depstat-url]: https://david-dm.org/rogeriopvl/gulp-mustache\n[depstat-image]: https://david-dm.org/rogeriopvl/gulp-mustache.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogeriopvl%2Fgulp-mustache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogeriopvl%2Fgulp-mustache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogeriopvl%2Fgulp-mustache/lists"}