{"id":19806617,"url":"https://github.com/timnew/vinyl-fs-mock","last_synced_at":"2025-08-23T10:35:06.514Z","repository":{"id":52140382,"uuid":"21771700","full_name":"timnew/vinyl-fs-mock","owner":"timnew","description":"A fake implementation for vinyl-fs, which is used in gulp. Useful for gulp plugin test.","archived":false,"fork":false,"pushed_at":"2022-12-01T23:48:50.000Z","size":137,"stargazers_count":4,"open_issues_count":6,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-28T04:24:42.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/timnew/gulp-mock-fs","language":"CoffeeScript","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/timnew.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-07-12T16:51:03.000Z","updated_at":"2019-11-15T20:29:04.000Z","dependencies_parsed_at":"2023-01-23T21:30:25.160Z","dependency_job_id":null,"html_url":"https://github.com/timnew/vinyl-fs-mock","commit_stats":null,"previous_names":["timnew/gulp-mock-fs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timnew/vinyl-fs-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fvinyl-fs-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fvinyl-fs-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fvinyl-fs-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fvinyl-fs-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timnew","download_url":"https://codeload.github.com/timnew/vinyl-fs-mock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fvinyl-fs-mock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746658,"owners_count":24813575,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-12T09:08:00.876Z","updated_at":"2025-08-23T10:35:06.493Z","avatar_url":"https://github.com/timnew.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"vinyl-fs-mock [![NPM version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Dependency Status][depstat-image]][depstat-url]\n================\n\n\u003e A fake file system implementation, used for test code written based on [vinyl]() and [vinyl-fs](). \n\u003e Useful for [gulp]() plugin unit test. \n\u003e With [vinyl-fs-mock][homepage], all the file fixtures can be provided inline. So not more external fixtures needed.\n\n## Install\n\nInstall using [npm][npm-url].\n\n    $ npm install vinyl-fs-mock\n\n## Usage\n\n```coffeescript\n\nrequire('./spec_helper')\n\ndescribe 'smoke test', -\u003e\n  createFS = require('../index')\n  coffee = require('gulp-coffee')\n  \n  it 'should mock gulp', (done) -\u003e  \n    fs = createFS\n          src:\n            coffee:\n              'sample.coffee': \"\"\"\n                console.log 'Hello world'\n              \"\"\"\n              'another.coffee': \"\"\"\n                fib = (n) -\u003e\n                  switch n\n                    when 0, 1\n                      1\n                    else\n                      fib(n) + fib(n-1)  \n              \"\"\"\n        \n    fs.src 'src/coffee/*.coffee' # work as same as gulp.src\n      .pipe coffee\n        bare: true\n      .pipe fs.dest 'dest/js'    # work as same as gulp.dest\n      .onFinished done, (folder) -\u003e\n        # console.log fs.directory  # Display whole tree of files\n        folder.should.equal fs.openFolder('dest/js')                \n        folder['sample.js'].should.not.be.null\n        folder['another.js'].should.not.be.null\n      \n```\n\n`vinyl-fs-mock` is being used in the unit tests for [gulp-tree-concat](https://github.com/timnew/gulp-tree-concat). \n\nCheck [concat_javascripts.spec.coffee](https://github.com/timnew/gulp-tree-concat/blob/master/specs/concat_javascripts.spec.coffee) for more detail\n\n\n## API\n\n\u003e TODO\n \n## License\nMIT\n\n[![NPM downloads][npm-downloads]][npm-url]\n\n[homepage]: https://github.com/timnew/vinyl-fs-mock\n\n[npm-url]: https://npmjs.org/package/vinyl-fs-mock\n[npm-image]: http://img.shields.io/npm/v/vinyl-fs-mock.svg?style=flat\n[npm-downloads]: http://img.shields.io/npm/dm/vinyl-fs-mock.svg?style=flat\n\n[ci-url]: https://drone.io/github.com/timnew/vinyl-fs-mock/latest\n[ci-image]: https://drone.io/github.com/timnew/vinyl-fs-mock/status.png\n\n[depstat-url]: https://gemnasium.com/timnew/vinyl-fs-mock\n[depstat-image]: http://img.shields.io/gemnasium/timnew/vinyl-fs-mock.svg?style=flat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimnew%2Fvinyl-fs-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimnew%2Fvinyl-fs-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimnew%2Fvinyl-fs-mock/lists"}