{"id":24756070,"url":"https://github.com/wavehack/gulp-dot-flatten","last_synced_at":"2026-04-17T10:31:56.592Z","repository":{"id":57257364,"uuid":"84603929","full_name":"WaveHack/gulp-dot-flatten","owner":"WaveHack","description":"Gulp plugin to recursively flatten JS files into a single directory","archived":false,"fork":false,"pushed_at":"2017-03-11T23:56:20.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T04:03:33.137Z","etag":null,"topics":["gulp-plugin","screeps"],"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/WaveHack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-10T21:56:37.000Z","updated_at":"2017-03-13T12:16:24.000Z","dependencies_parsed_at":"2022-09-08T07:10:59.398Z","dependency_job_id":null,"html_url":"https://github.com/WaveHack/gulp-dot-flatten","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaveHack%2Fgulp-dot-flatten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaveHack%2Fgulp-dot-flatten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaveHack%2Fgulp-dot-flatten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaveHack%2Fgulp-dot-flatten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WaveHack","download_url":"https://codeload.github.com/WaveHack/gulp-dot-flatten/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066524,"owners_count":20555404,"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":["gulp-plugin","screeps"],"created_at":"2025-01-28T13:37:57.673Z","updated_at":"2026-04-17T10:31:56.559Z","avatar_url":"https://github.com/WaveHack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-dot-flatten\n\n[![Build Status](https://travis-ci.org/WaveHack/gulp-dot-flatten.svg?branch=master)](https://travis-ci.org/WaveHack/gulp-dot-flatten)\n[![Dependency Status](https://gemnasium.com/badges/github.com/WaveHack/gulp-dot-flatten.svg)](https://gemnasium.com/github.com/WaveHack/gulp-dot-flatten)\n![Downloads](https://img.shields.io/npm/dm/gulp-dot-flatten.svg)\n![NPM version](https://img.shields.io/node/v/gulp-dot-flatten.svg)\n[![License](https://img.shields.io/npm/l/gulp-dot-flatten.svg)](https://opensource.org/licenses/MIT)\n\ngulp-dot-flatten is a [gulp](https://github.com/gulpjs/gulp) plugin to recursively flatten JS files into a single directory.\n\n## About\n\n\nWill rewrite the following filenames when used with the [usage](#usage) example below:  \n\n```\n/build/Main.js\n/build/Foo/Bar.js\n/build/Foo/Bar/Baz.js\n```\n\nInto this:\n\n```\n/dist/Main.js\n/dist/Foo.Bar.js\n/dist/Foo.Bar.Baz.js\n```\n\nAny `require('./foo/bar')` will be rewritten into `require('./foo.bar')`.\n\nThis library is made specifically for usage with [Screeps](https://screeps.com/) due to its lack of directory support.\n\n## Install\n\n`npm install --save-dev gulp-dot-flatten`\n\n## Usage\n\n```js\nvar dotFlatten = require('gulp-dot-flatten');\n\ngulp.task('flatten', () =\u003e {\n    return gulp.src('./build/**/*.js')\n        .pipe(dotFlatten())\n        .pipe(gulp.dest('./dist'));\n});\n```\n\n## Options\n\n### dotFlatten(options)\n\n#### options.stringFilter\n\nType: `Function`\n\nOptional function in which the filename will pass through. Useful for things like forcing lowercase filenames, if desired.\n\nExample:\n\n```js\nvar dotFlatten = require('gulp-dot-flatten');\n\ngulp.task('flatten', () =\u003e {\n    return gulp.src('./build/**/*.js')\n        .pipe(dotFlatten({\n            stringFilter: (str) =\u003e str.toLowerCase()\n        }))\n        .pipe(gulp.dest('./dist'));\n});\n```\n\n\n#### options.verbose\n\nType: `Boolean`  \nDefault: `false`\n\n## Attribution\n\ngulp-dot-flatten is based on the [inline library](https://github.com/screepers/screeps-typescript-starter/blob/master/libs/gulp-dot-flatten.js) of the same name found in the [Screeps TypeScript Starter Kit](https://github.com/screepers/screeps-typescript-starter).\n\nOriginal authors and contributors:\n\n- [resir014](https://github.com/resir014)\n- [valerian](https://github.com/valerian)\n- [ratuple](https://github.com/ratuple)\n- [ags131](https://github.com/ags131)\n\n## License\n\ngulp-dot-flatten is open-sourced software licensed under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavehack%2Fgulp-dot-flatten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavehack%2Fgulp-dot-flatten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavehack%2Fgulp-dot-flatten/lists"}