{"id":15687333,"url":"https://github.com/trstringer/boiler-room-custodian","last_synced_at":"2025-08-06T13:09:21.858Z","repository":{"id":74790631,"uuid":"68654157","full_name":"trstringer/boiler-room-custodian","owner":"trstringer","description":":tiger2: mop up those boilerplates","archived":false,"fork":false,"pushed_at":"2017-04-12T17:41:30.000Z","size":25637,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T21:20:02.542Z","etag":null,"topics":["boilerplate","cleanup","node"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trstringer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-09-19T23:08:15.000Z","updated_at":"2024-09-10T05:47:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6864a67-2daa-4a9f-8a56-0dc3fa628046","html_url":"https://github.com/trstringer/boiler-room-custodian","commit_stats":null,"previous_names":["tstringer/boiler-room-custodian"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fboiler-room-custodian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fboiler-room-custodian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fboiler-room-custodian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fboiler-room-custodian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trstringer","download_url":"https://codeload.github.com/trstringer/boiler-room-custodian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252945689,"owners_count":21829634,"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":["boilerplate","cleanup","node"],"created_at":"2024-10-03T17:47:30.270Z","updated_at":"2025-05-07T19:41:56.848Z","avatar_url":"https://github.com/trstringer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :eyeglasses: Boiler Room Custodian\n\n*Because boilerplates need a little cleanup sometimes* :honeybee:\n\n![demo](demo.gif)\n\n## :exclamation: :question: Why :question: :exclamation:\n\nSimple :full_moon_with_face: There are lots of amazing boilerplates out there that do a great job of giving us what we need.  They also often include minimal sample app code just so we can \"see it run\".  What `boiler-plate-custodian` aims to do is have a way to use configuration to clean that all up when ready to start development on the project.\n\n## :bulb: What should this turn into? :bulb:\n\nIdeally the best place for a cleanup configuration to be stored would be in the root directory of the boilerplate repositories themselves.  Then have a little npm script that runs `mop` (the bin of `boiler-plate-custodian`).  That way the boilerplate consumers would have a typical workflow of...\n\n 1. clone the boilerplate\n 2. run the boilerplate as-is viewing functionality/sample\n 3. run `boiler-plate-custodian` (i.e. `npm run cleanup`)\n 4. start development on minified project\n\n## :boom: (boilerplate maintainers) What should you do? :boom:\n\n 1. `npm install --save-dev boiler-room-custodian`\n 2. create [`setup.js`](#page_facing_up-cleanupjs-structuresample-page_facing_up) in the root dir of the boilerplate\n 3. note what it would take (files removed, added, modified) to remove unnecessary code/files\n 4. inject the item changes in the `setup.js` configuration\n 5. create an npm script i.e. `\"cleanup\": \"mop -v\"`\n\n## :page_facing_up: `setup.js` structure/sample :page_facing_up:\n\n*The below example uses a cleanup configuration for the extremely useful [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate)*\n\n**[Pull Request illustrating the code changes for this boilerplate](https://github.com/chentsulin/electron-react-boilerplate/pull/402)**\n\n```javascript\nmodule.exports = {\n  // remove the following files as they are mostly \n  // related to the sample counter page and functionality\n  remove: [\n    { file: 'app/actions/counter.js' },\n    { file: 'app/components/Counter.css' },\n    { file: 'app/components/Counter.js' },\n    { file: 'app/containers/CounterPage.js' },\n    { file: 'app/reducers/counter.js' },\n    { file: 'test/actions/counter.spec.js' },\n    { file: 'test/components/Counter.spec.js' },\n    { file: 'test/containers/CounterPage.spec.js' },\n    { file: 'test/reducers/counter.spec.js' },\n    { file: 'CHANGELOG.md' },\n    { file: 'erb-logo.png' }\n  ],\n  // clean the following files by either clearing them \n  // (by specifying {clear: true}) or by removing lines \n  // that match a regex pattern\n  clean: [\n    {\n      file: 'app/reducers/index.js',\n      pattern: /counter/\n    },\n    {\n      file: 'app/store/configureStore.development.js',\n      pattern: /counterActions/\n    },\n    {\n      file: 'app/app.global.css',\n      clear: true\n    },\n    {\n      file: 'app/routes.js',\n      pattern: /CounterPage/\n    },\n    {\n      file: 'test/e2e.js',\n      clear: true\n    },\n    {\n      file: 'README.md',\n      clear: true\n    },\n    {\n      file: 'app/components/Home.js',\n      pattern: /(h2|Link to)/\n    }\n  ],\n  // add the following files to the project, mostly \n  // related to .gitkeep for version control\n  add: [\n    { file: 'app/actions/.gitkeep' },\n    { file: 'test/actions/.gitkeep' },\n    { file: 'test/components/.gitkeep' },\n    { file: 'test/containers/.gitkeep' },\n    { file: 'test/reducers/.gitkeep' }\n  ]\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fboiler-room-custodian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrstringer%2Fboiler-room-custodian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fboiler-room-custodian/lists"}