{"id":19460427,"url":"https://github.com/haensl/gulp-embed-json","last_synced_at":"2026-05-04T01:32:27.082Z","repository":{"id":26887609,"uuid":"111725134","full_name":"haensl/gulp-embed-json","owner":"haensl","description":"Gulp plugin to inline/embed JSON data into HTML files.","archived":false,"fork":false,"pushed_at":"2023-01-11T19:01:46.000Z","size":273,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T23:56:50.094Z","etag":null,"topics":["automation","ci","embed","gulp","gulp-plugin","gulp-tasks","gulpplugin","html","inline","inline-json","json","npm","npm-module","npm-package"],"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/haensl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["haensl"]}},"created_at":"2017-11-22T19:37:29.000Z","updated_at":"2021-11-14T11:52:53.000Z","dependencies_parsed_at":"2023-01-14T05:29:47.527Z","dependency_job_id":null,"html_url":"https://github.com/haensl/gulp-embed-json","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/haensl/gulp-embed-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2Fgulp-embed-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2Fgulp-embed-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2Fgulp-embed-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2Fgulp-embed-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haensl","download_url":"https://codeload.github.com/haensl/gulp-embed-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2Fgulp-embed-json/sbom","scorecard":{"id":452606,"data":{"date":"2025-08-11","repo":{"name":"github.com/haensl/gulp-embed-json","commit":"4fd7046b936b1a390d73895dc9f102d4cb57ba6d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.5.11 not signed: https://api.github.com/repos/haensl/gulp-embed-json/releases/88632044","Warn: release artifact v1.5.10 not signed: https://api.github.com/repos/haensl/gulp-embed-json/releases/63611079","Warn: release artifact v1.5.9 not signed: https://api.github.com/repos/haensl/gulp-embed-json/releases/60821562","Warn: release artifact v1.5.8 not signed: https://api.github.com/repos/haensl/gulp-embed-json/releases/60275285","Warn: release artifact v1.5.7 not signed: https://api.github.com/repos/haensl/gulp-embed-json/releases/59797159","Warn: release artifact v1.5.11 does not have provenance: https://api.github.com/repos/haensl/gulp-embed-json/releases/88632044","Warn: release artifact v1.5.10 does not have provenance: https://api.github.com/repos/haensl/gulp-embed-json/releases/63611079","Warn: release artifact v1.5.9 does not have provenance: https://api.github.com/repos/haensl/gulp-embed-json/releases/60821562","Warn: release artifact v1.5.8 does not have provenance: https://api.github.com/repos/haensl/gulp-embed-json/releases/60275285","Warn: release artifact v1.5.7 does not have provenance: https://api.github.com/repos/haensl/gulp-embed-json/releases/59797159"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T08:35:12.249Z","repository_id":26887609,"created_at":"2025-08-19T08:35:12.249Z","updated_at":"2025-08-19T08:35:12.249Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["automation","ci","embed","gulp","gulp-plugin","gulp-tasks","gulpplugin","html","inline","inline-json","json","npm","npm-module","npm-package"],"created_at":"2024-11-10T17:37:07.786Z","updated_at":"2026-05-04T01:32:27.056Z","avatar_url":"https://github.com/haensl.png","language":"JavaScript","funding_links":["https://github.com/sponsors/haensl"],"categories":[],"sub_categories":[],"readme":"# gulp-embed-json\n\nGulp plugin to inline/embed JSON data into HTML files.\n\n[![NPM](https://nodei.co/npm/gulp-embed-json.png?downloads=true)](https://nodei.co/npm/gulp-embed-json/)\n\n[![npm version](https://badge.fury.io/js/gulp-embed-json.svg)](http://badge.fury.io/js/gulp-embed-json)\n[![CircleCI](https://circleci.com/gh/haensl/gulp-embed-json.svg?style=svg)](https://circleci.com/gh/haensl/gulp-embed-json)\n\n## Installation\n\n```shell\nnpm i --save-dev gulp-embed-json\n```\n\n## Quick Start\n```javascript\nconst embedJSON = require('gulp-embed-json');\n\ngulp.task('embedJSON', () =\u003e\n  gulp.src('*.html')\n    .pipe(embedJSON())\n    .pipe(gulp.dest('dist/')));\n```\n\nThis gulp task will inline/embed any scripts with JSON source attribute and respective mime type.\n\n## Options\n\n### mimeTypes `string | Array\u003cstring\u003e`\n\nProvide custom mime types to specify which `\u003cscript\u003e` tags should be embedded.\n\n#### default: `application/json, application/ld+json`\n\n##### Example: Embed only tags with `type=\"application/ld+json\"`\n\nHTML layout\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\" src=\"data.json\"\u003e\u003c/script\u003e\n    \u003cscript type=\"application/ld+json\" src=\"structured-data.json\"\u003e\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nstructured-data.json\n```json\n{\n  \"@context\": \"http://schema.org\",\n  \"@type\": \"SoftwareApplication\",\n  \"name\": \"gulp-embed-json\"\n}\n```\n\nGulp task\n```javascript\nconst embedJSON = requrie('gulp-embed-json');\n\n// ...\n\ngulp.task('embedJSON', () =\u003e\n  gulp.src('*.html')\n    .pipe(embedJSON({\n      mimeTypes: 'application/ld+json'\n    }))\n    .pipe(gulp.dest('dist/')));\n```\n\nOutput\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\" src=\"data.json\"\u003e\u003c/script\u003e\n    \u003cscript type=\"application/ld+json\"\u003e{\"@context\":\"http://schema.org\",\"@type\":\"SoftwareApplication\",\"name\":\"gulp-embed-json\"}\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### root `string`\n\nProvide the directory root where JSON files are located.\n\n#### default: `__dirname`\n\nThe folder in which the module is executed.\n\n#### Example: Alternative JSON file root\n\nHTML layout\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\" src=\"data.json\"\u003e\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n\nFolder structure\n```shell\n/src\n  index.html\n  gulpfile.js\n  /assets\n    /json\n      data.json\n```\n\nGulp task\n```javascript\nconst embedJSON = requrie('gulp-embed-json');\n\n// ...\n\ngulp.task('embedJSON', () =\u003e\n  gulp.src('*.html')\n    .pipe(embedJSON({\n      root: './assets/json'\n    }))\n    .pipe(gulp.dest('dist/')));\n```\n\n### minify `boolean`\n\nIndicate whether or not to minify JSON data.\n\n#### default: `true`\n\n#### Example: Minify\n\nHTML layout\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\" src=\"data.json\"\u003e\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\ndata.json\n```json\n{\n  \"foo\": \"bar\"\n}\n```\n\nGulp task\n```javascript\nconst embedJSON = requrie('gulp-embed-json');\n\n// ...\n\ngulp.task('embedJSON', () =\u003e\n  gulp.src('*.html')\n    .pipe(embedJSON({\n      minify: true // default\n    }))\n    .pipe(gulp.dest('dist/')));\n```\n\nOutput\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\"\u003e{\"foo\":\"bar\"}\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### Example: Do not Minify\n\nHTML layout\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\" src=\"data.json\"\u003e\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\ndata.json\n```json\n{\n  \"foo\": \"bar\"\n}\n```\n\nGulp task\n```javascript\nconst embedJSON = requrie('gulp-embed-json');\n\n// ...\n\ngulp.task('embedJSON', () =\u003e\n  gulp.src('*.html')\n    .pipe(embedJSON({\n      minify: false\n    }))\n    .pipe(gulp.dest('dist/')));\n```\n\nOutput\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c!-- ... --\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"application/json\"\u003e{\n    \"foo\": \"bar\"\n    }\u003c/script\u003e\n    \u003c!-- ... --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### encoding `string`\n\nProvide the encoding of your JSON files.\n\n#### default: `utf8`\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaensl%2Fgulp-embed-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaensl%2Fgulp-embed-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaensl%2Fgulp-embed-json/lists"}