{"id":16641859,"url":"https://github.com/samthor/fs-assembler","last_synced_at":"2025-03-12T05:28:46.939Z","repository":{"id":66115169,"uuid":"315194588","full_name":"samthor/fs-assembler","owner":"samthor","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-27T04:09:14.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-18T15:52:52.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-23T03:52:34.000Z","updated_at":"2020-11-27T04:09:16.000Z","dependencies_parsed_at":"2023-02-20T19:30:59.254Z","dependency_job_id":null,"html_url":"https://github.com/samthor/fs-assembler","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/samthor%2Ffs-assembler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ffs-assembler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ffs-assembler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ffs-assembler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/fs-assembler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243164986,"owners_count":20246718,"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-12T07:48:06.514Z","updated_at":"2025-03-12T05:28:46.920Z","avatar_url":"https://github.com/samthor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Library to help with assembling build artifacts in-place.\nInstall with `fs-assembler`.\n\n# Use\n\n```js\nimport {Assembler} from 'fs-assembler';\n\nconst build = new Assembler('dist', {clean: true});\n\nbuild.write('foo.json', async () =\u003e {\n  const someObject = /* get from somewhere async */;\n  return JSON.stringify(someObject);\n});\n\nbuild.copy('path/to/real/file.css', 'target.css');  // copies to target.css\nbuild.copy(['x/file1', 'x/file2'], {base: 'x'});    // creates file1/file2\n\nawait build.touch('zero-file');  // touches zero-file, can optionally await\n\nawait build.done();  // waits on all jobs sofar\n\nbuild.write('extraFile.js', 'its content');\n\nawait build.done();  // can wait a 2nd time\n```\n\nThe code will throw if files are duplicated or you try to write outside the initial root.\n\nThe constructor accepts options:\n\n- `clean`: whether to remove the target dir before starting\n- `loader`: async method to load content when `.write()` called without content\n- `validate`: method to validate or update target path (cannot be async)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Ffs-assembler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Ffs-assembler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Ffs-assembler/lists"}