{"id":29023068,"url":"https://github.com/bamlab/parcel-plugin-handlebars-mock","last_synced_at":"2025-06-26T03:05:15.332Z","repository":{"id":50220425,"uuid":"341858860","full_name":"bamlab/parcel-plugin-handlebars-mock","owner":"bamlab","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-01T15:59:17.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-15T00:00:05.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bamlab.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":"2021-02-24T10:13:10.000Z","updated_at":"2021-06-01T15:59:20.000Z","dependencies_parsed_at":"2022-09-24T08:52:21.166Z","dependency_job_id":null,"html_url":"https://github.com/bamlab/parcel-plugin-handlebars-mock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bamlab/parcel-plugin-handlebars-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Fparcel-plugin-handlebars-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Fparcel-plugin-handlebars-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Fparcel-plugin-handlebars-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Fparcel-plugin-handlebars-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bamlab","download_url":"https://codeload.github.com/bamlab/parcel-plugin-handlebars-mock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Fparcel-plugin-handlebars-mock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990350,"owners_count":23241188,"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":"2025-06-26T03:05:14.150Z","updated_at":"2025-06-26T03:05:15.309Z","avatar_url":"https://github.com/bamlab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @bam.tech/parcel-plugin-handlebars-mock\n\nPopulate HTML file with mock data in development.\nIt also let you register helper methods for handlebars\n\n## Installation\n\n`yarn add @bam.tech/parcel-plugin-handlebars-mock`\n\n## Usage\n\n### Mock data\n\n- Create a `src/mock` directory.\n- For each html file (named `foo.html` for example), create a `src/mock/foo.html.js` with the mock content:\n\n```js\nmodule.exports = {\n  bar: 'baz',\n};\n```\n\n- If `NODE_ENV` is `production`, then the plugin is not applied.\n\n### Register helper methods\n\n- create a `src/helper` directory with an `index.js` that register some templates\n\n```js\nconst Handlebars = require('handlebars');\n\nHandlebars.registerHelper('isArrayBig', (array) =\u003e {\n  return array.length \u003e 3;\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamlab%2Fparcel-plugin-handlebars-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbamlab%2Fparcel-plugin-handlebars-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamlab%2Fparcel-plugin-handlebars-mock/lists"}