{"id":20027090,"url":"https://github.com/unic/gulp-unic-handlebars","last_synced_at":"2025-03-02T04:41:11.211Z","repository":{"id":30430898,"uuid":"33983881","full_name":"unic/gulp-unic-handlebars","owner":"unic","description":null,"archived":false,"fork":false,"pushed_at":"2015-04-15T09:02:39.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-01-12T17:15:53.369Z","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/unic.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":"2015-04-15T09:02:28.000Z","updated_at":"2015-04-15T09:02:40.000Z","dependencies_parsed_at":"2022-09-07T20:51:21.761Z","dependency_job_id":null,"html_url":"https://github.com/unic/gulp-unic-handlebars","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/unic%2Fgulp-unic-handlebars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fgulp-unic-handlebars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fgulp-unic-handlebars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fgulp-unic-handlebars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unic","download_url":"https://codeload.github.com/unic/gulp-unic-handlebars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241460058,"owners_count":19966516,"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-13T09:09:01.212Z","updated_at":"2025-03-02T04:41:11.179Z","avatar_url":"https://github.com/unic.png","language":"JavaScript","readme":"# gulp-unic-handlebars\n\n## Usage\n\nFirst, install `gulp-unic-handlebars` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-unic-handlebars@git+https://git@github.com/unic/gulp-unic-handlebars.git\n```\n\nThen, add it to your `gulpfile.js` (probably together with [gulp-rename](https://www.npmjs.com/package/gulp-rename)):\n\n```javascript\nvar handlebars = require('gulp-unic-handlebars'),\n  rename = require('gulp-rename');\n\ngulp.task('html', function(){\n  gulp.src(['app/*.hbs'])\n    .pipe(handlebars({\n      data: function(file) {\n        return require('./app/' + path.basename(file.path, '.hbs') + '.json');\n      },\n      partials: ['./app/partials/*.hbs'],\n      getPartialName: function(filePath) {\n          var extension = path.extname(filePath),\n              name = path.relative('./app/partials/', filePath).replace(extension, '');\n\n          return name.split(path.sep).join('/');\n      }\n    }))\n    .pipe(rename({\n      extname: '.html'\n    }))\n    .pipe(gulp.dest('dist/'));\n});\n```\n\n\n## Options\n\n### options.data\nType: `Object|Function`\n\nData object to pass to the template or function taking the template's path as argument (see example above).\n\n### options.partials\nType: `String|Array`\n\nGlob or array of globs.\n\n### options.getPartialName\nType: `Function`\n\nTransformation function for partial names taking the partial's path as argument (see example above).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funic%2Fgulp-unic-handlebars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funic%2Fgulp-unic-handlebars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funic%2Fgulp-unic-handlebars/lists"}