{"id":16124020,"url":"https://github.com/itaditya/birla","last_synced_at":"2025-03-18T12:31:36.332Z","repository":{"id":53503102,"uuid":"135582563","full_name":"itaditya/birla","owner":"itaditya","description":"birla is a CLI tool to easily create new file-structure scaffolds from template directories.","archived":false,"fork":false,"pushed_at":"2021-03-27T18:03:57.000Z","size":11,"stargazers_count":26,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-07T05:02:11.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/birla","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/itaditya.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":"2018-05-31T12:45:14.000Z","updated_at":"2023-02-15T15:49:38.000Z","dependencies_parsed_at":"2022-09-15T15:23:13.178Z","dependency_job_id":null,"html_url":"https://github.com/itaditya/birla","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/itaditya%2Fbirla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itaditya%2Fbirla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itaditya%2Fbirla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itaditya%2Fbirla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itaditya","download_url":"https://codeload.github.com/itaditya/birla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926063,"owners_count":20369911,"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-09T21:19:30.258Z","updated_at":"2025-03-18T12:31:35.991Z","avatar_url":"https://github.com/itaditya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Birla\n\n\u003e Birla is a CLI tool to easily create new file-structure scaffolds from template directories.\n\n### Why did I make this ?\n\nI was wasting a lot of time, creating files and folders whenever I made new components in React or Angular. Now, I just create a template for the component and using `birla` generate new components easily. `birla` will take care of changing file names and their content too. This is so much better than copy paste or code snippets.\n\n## Advantages\n\n1. Supercharge your productivity.\n1. Maintain consistent structure of modules/components etc. across teams.\n1. Write once, use 1000 times.\n1. Focus on building features, not files.\n\n## How To Use ?\n\n1. Install the cli tool using `npm i -g birla`.\n1. In your project root, create a `birla-templates` folder.\n1. In this folder, you have to place your templates. Each template is a folder.\n1. In terminal run `birla -n Name -t TemplateName DestinationDirectory`\n\n### Example - \n\n#### Brief Idea:\nFor each template we create a folder inside `birla-templates`. In a template we can use $NAME to substitute it with the name provided in CLI.\n\nWe can also force convert the case of name with _c (camel), _p (pascal), _s (snake), _h (hyphen).\n\n#### Sample Directory Structure:\n```\nbirla-templates\n    └───simple-component\n        └───$NAME_s\n                $NAME_h.css\n                $NAME.js\n                index.js\n```\n\n#### Sample File\n```js\n// /birla-templates/simple-component/$NAME_s/$NAME.js\nconst $NAME = () =\u003e {\n  console.log('$NAME_h');\n}\n\nexport default $NAME;\n\n```\n\n#### Sample Instruction\n```\nbirla -n NewComponent -t simple-component app/components/\n```\n\nThis will create a folder named `new_component` inside `app/components/` which will have 3 files `new-component.css`, `NewComponent.js`, `index.js`. In each file $NAME will be replaced by `NewComponent`. $NAME_h with `new-component` and so on.\n\nIt means that `app/components/new_component/NewComponent.js` will look like -\n```js\nconst NewComponent = () =\u003e {\n  console.log('new-component');\n}\n\nexport default NewComponent;\n```\n\n### Pitfalls\n\n* If the file/folder already exists, birla will fail.\n\nInspired from [remmy](https://github.com/colshacol/remmy/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitaditya%2Fbirla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitaditya%2Fbirla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitaditya%2Fbirla/lists"}