{"id":13804039,"url":"https://github.com/fmal/gulp-inline-source","last_synced_at":"2025-05-13T17:31:01.942Z","repository":{"id":14808586,"uuid":"17530920","full_name":"fmal/gulp-inline-source","owner":"fmal","description":"Inline flagged js \u0026 css sources.","archived":false,"fork":false,"pushed_at":"2019-06-11T14:34:14.000Z","size":32,"stargazers_count":211,"open_issues_count":19,"forks_count":31,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T21:19:31.128Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fmal.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-03-07T23:46:12.000Z","updated_at":"2025-01-06T10:16:22.000Z","dependencies_parsed_at":"2022-09-16T04:31:18.877Z","dependency_job_id":null,"html_url":"https://github.com/fmal/gulp-inline-source","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmal%2Fgulp-inline-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmal%2Fgulp-inline-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmal%2Fgulp-inline-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmal%2Fgulp-inline-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fmal","download_url":"https://codeload.github.com/fmal/gulp-inline-source/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253992977,"owners_count":21996207,"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-08-04T01:00:40.643Z","updated_at":"2025-05-13T17:31:01.662Z","avatar_url":"https://github.com/fmal.png","language":"JavaScript","funding_links":[],"categories":["Inline sources (styles, scripts)"],"sub_categories":[],"readme":"# gulp-inline-source\n\n[![NPM Version](https://img.shields.io/npm/v/gulp-inline-source.svg?style=flat-square)](https://www.npmjs.com/package/gulp-inline-source)\n[![Build Status](https://img.shields.io/travis/fmal/gulp-inline-source/master.svg?style=flat-square)](http://travis-ci.org/fmal/gulp-inline-source) \n[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)\n\n\u003e Inline all `\u003cscript\u003e`, `\u003clink\u003e` and `\u003cimg\u003e` tags that contain the `inline` attribute with [inline-source](https://github.com/popeindustries/inline-source).\n\n## How it works\n\n```html\n\u003c!-- located at src/html/index.html --\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003c!-- inline src/js/inlineScript.js --\u003e\n    \u003cscript src=\"../js/inlineScript.js\" inline\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n```js\n// located at src/js/inlineScript.js\n\nfunction test() {\n  var foo = 'lorem ipsum';\n  return foo;\n}\n```\n\nOutput:\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript\u003efunction test(){var a=\"lorem ipsum\";return a}\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Install\n\n```bash\n$ npm install gulp-inline-source --save-dev\n```\n\n## Usage\n\n```javascript\nvar gulp = require('gulp');\nvar inlinesource = require('gulp-inline-source');\n\ngulp.task('inlinesource', function () {\n    return gulp.src('./src/*.html')\n        .pipe(inlinesource())\n        .pipe(gulp.dest('./out'));\n});\n```\n\nOptionally, you can provide [some options](https://github.com/popeindustries/inline-source#usage) through an options object:\n\n```javascript\nvar gulp = require('gulp');\nvar inlinesource = require('gulp-inline-source');\n\ngulp.task('inlinesource', function () {\n    var options = {\n        compress: false\n    };\n\n    return gulp.src('./src/*.html')\n        .pipe(inlinesource(options))\n        .pipe(gulp.dest('./out'));\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmal%2Fgulp-inline-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmal%2Fgulp-inline-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmal%2Fgulp-inline-source/lists"}