{"id":15314003,"url":"https://github.com/vanruesc/grunt-fs-inline","last_synced_at":"2025-10-08T23:32:15.986Z","repository":{"id":57255064,"uuid":"46672862","full_name":"vanruesc/grunt-fs-inline","owner":"vanruesc","description":"This grunt plugin enables you to use brfs without browserify.","archived":true,"fork":false,"pushed_at":"2016-03-01T16:09:15.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T22:36:03.347Z","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":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanruesc.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":"2015-11-22T18:07:47.000Z","updated_at":"2023-01-28T20:49:17.000Z","dependencies_parsed_at":"2022-08-31T08:31:46.418Z","dependency_job_id":null,"html_url":"https://github.com/vanruesc/grunt-fs-inline","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fgrunt-fs-inline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fgrunt-fs-inline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fgrunt-fs-inline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fgrunt-fs-inline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanruesc","download_url":"https://codeload.github.com/vanruesc/grunt-fs-inline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235775518,"owners_count":19043180,"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-10-01T08:44:08.685Z","updated_at":"2025-10-08T23:32:10.713Z","avatar_url":"https://github.com/vanruesc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-fs-inline \n[![Build status](https://travis-ci.org/vanruesc/grunt-fs-inline.svg?branch=master)](https://travis-ci.org/vanruesc/grunt-fs-inline) \n[![npm version](https://badge.fury.io/js/grunt-fs-inline.svg)](https://badge.fury.io/js/grunt-fs-inline) \n[![Dependencies](https://david-dm.org/vanruesc/grunt-fs-inline.svg?branch=master)](https://david-dm.org/vanruesc/grunt-fs-inline)\n\nThis grunt plugin enables you to use [brfs](https://github.com/substack/brfs) without browserify. It's useful if you want to \ninline external files like shader code in your JavaScript files.\n\n\n## Getting Started\n\nThis plugin requires Grunt \u003e= 0.4.0\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) \nguide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. \nOnce you're familiar with that process, you may install this plugin with this command:\n\n```sh\nnpm install grunt-fs-inline --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks(\"grunt-fs-inline\");\n```\n\n\n## Usage\nSpecify a source path ```src``` and a destination path ```dest```. __The destination is always relative to the source path.__ Directories \nwill be created if they don't exist. If you don't specify a clear file name with a file extension in ```dest```, then the name of the source \nfile will be used instead.\n\n```js\nfsinline: {\n  taskA: {\n    src: \"src/foo.js\",\n    dest: \"./foo.inlined.js\"\n  },\n  taskB: {\n    src: \"src/foo.js\",\n    dest: \"../other/dir\"\n  },\n  ...\n}\n```\n\n\n### Glob\nYou may use [glob patterns](https://github.com/isaacs/node-glob#glob-primer) in order to inline a bunch of files at once. \n\n```js\nfsinline: {\n  task: {\n    src: \"src/**/foo.js\",\n    dest: \"./bar\"\n  }\n}\n```\n\nThe above configuration will create the sub directory __bar__ wherever files with the name __foo.js__ are found in __src__. The inlined version of \nthe source file will be written to a new file with the _same name_ in the created directory, because ```dest``` doesn't clearly specify a file name here.\n\n\n### Options\nIn addition to the underlying [brfs](https://github.com/substack/brfs#var-tr--brfsfile-opts) and [glob](https://github.com/isaacs/node-glob#options) \noptions, you may also append an arbitrary text to the inlined files.\n\n```js\nfsinline: {\n  options: {\n    // Global options.\n    brfs: { ... },\n    glob: { ... },\n    append: \"export default foo;\"\n  },\n  taskA: {\n    options: {\n      // Local options.\n      brfs: null,\n      glob: null,\n      append: null\n    },\n    src: \"src/a.js\",\n    dest: \"./a.inlined.js\"\n  },\n  ...\n}\n```\n\n\n## Contributing\nMaintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.\n\n\n## License\n[Zlib](https://github.com/vanruesc/grunt-fs-inline/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanruesc%2Fgrunt-fs-inline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanruesc%2Fgrunt-fs-inline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanruesc%2Fgrunt-fs-inline/lists"}