{"id":16125501,"url":"https://github.com/semibran/scaffy","last_synced_at":"2025-08-09T05:32:11.846Z","repository":{"id":130492147,"uuid":"123413720","full_name":"semibran/scaffy","owner":"semibran","description":":sparkles:tiny project scaffolding tool","archived":false,"fork":false,"pushed_at":"2023-08-04T20:44:53.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-20T14:00:28.481Z","etag":null,"topics":["generator","template"],"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/semibran.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":"2018-03-01T09:36:10.000Z","updated_at":"2023-08-04T20:44:52.000Z","dependencies_parsed_at":"2024-10-20T09:31:33.428Z","dependency_job_id":"869abb69-60a9-428e-8cbc-40837586d35e","html_url":"https://github.com/semibran/scaffy","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/semibran%2Fscaffy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fscaffy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fscaffy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fscaffy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semibran","download_url":"https://codeload.github.com/semibran/scaffy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221711880,"owners_count":16868047,"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":["generator","template"],"created_at":"2024-10-09T21:29:50.923Z","updated_at":"2024-10-27T17:39:41.277Z","avatar_url":"https://github.com/semibran.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scaffy\nThis tool is a tiny project scaffolder that customizes a given template directory using a user-defined map.\n\nInstall it globally through npm:\n\n```sh\nnpm i -g scaffy\n```\n\nThe following represents an example directory to be used as a template. Notice the fields in double braces.\n\n```\ntemplates/module\n├── lib\n│   └── {{name}}.js -\u003e ''\n├── license         -\u003e ...\n├── package.json    -\u003e '{ \"name\": \"{{name}}\", \"description\": \"{{description}}\" }'\n└── readme.md       -\u003e '# {{name}}\\n\u003e {{description}}'\n```\n\nPassing this directory into scaffy will bring up a prompt that enables you to fill in the necessary fields.\n\n```sh\n$ scaffy templates/module\nscaffy v3.0.3\nUsing template `module`\n(1/2) name: example\n(2/2) description: An example module\nWrite to `/foo/bar/example` successful\n\n$ cat example/readme.md\n# example\n\u003e An example module\n\n$ ls example/lib\nexample.js\n```\n\nThis concept can be further expanded upon to cover logic-less templates as large as you deem necessary.\n\n## usage\n[![npm badge]][npm package]\n\n### CLI\n```\nusage:\n  $ scaffy [src] [options]\n\noptions:\n  -h, --help     show this help message\n  -v, --version  display package version\n  -i, --input    path to source template (alias for \u003csrc\u003e)\n  -o, --output   path to which the resulting file tree is written (defaults to name arg)\n  -O, --open     tag indicating the beginning of an expression (defaults to \"{{\")\n  -C, --close    tag indicating the end of an expression (defaults to \"}}\")\n\nexamples:\n  $ scaffy\n  $ scaffy templates/module -o new-directory\n```\n\n### API\n\n#### `scaffy(src, opts, cb(err, tree))`\nReplaces all instances of the keys provided by `opts.data` within `src`. The resulting file tree is passed to `cb` via `tree`, which takes the form `folder : { name : folder | file }`.\n\nOptions:\n* `data`: map detailing the keys to be replaced within the given template and their corresponding values (defaults to an empty object)\n* `dest`: path to which the resulting file tree is written (defaults to `src`)\n* `open`: tag indicating the beginning of an expression (defaults to `{{`)\n* `close`: tag indicating the end of an expression (defaults to `}}`)\n\n## related\n* [`semibran/fs-tree`][semibran/fs-tree]: underlying basis for this module's reads and writes\n* [`jamen/pixie`][jamen/pixie]: flexible templating engine responsible for this module's replacement mechanism\n\n[npm badge]:        https://nodei.co/npm/scaffy.png?mini\n[npm package]:      https://npmjs.com/package/scaffy\n[semibran/fs-tree]: https://github.com/semibran/fs-tree\n[jamen/pixie]:      https://github.com/jamen/pixie\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemibran%2Fscaffy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemibran%2Fscaffy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemibran%2Fscaffy/lists"}