{"_id":"@carbonorm/barrelsby","_rev":"1-5f4bd581176fe8c0575aaa4e4e91e3ca","name":"@carbonorm/barrelsby","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.3":{"name":"@carbonorm/barrelsby","version":"0.0.3","description":"Automatic TypeScript barrels for your entire code base","main":"index.js","scripts":{"build":"tsc","clean":"rimraf bin/ && rimraf test/**/output/**","prettier:fix":"prettier --write \"src/**/*.ts\"","lint":"tslint --project tsconfig.json -t stylish","integration-test":"ts-node test/src.ts","test":"jest","synk":"SNYK_CONFIG_ORG='barrelsby'; snyk test"},"repository":{"type":"git","url":"git+https://github.com/bencoveney/barrelsby.git"},"keywords":["TypeScript","Barrel","Module","Barrelsby"],"author":{"name":"Ben Coveney","email":"bencoveney@gmail.com","url":"https://github.com/bencoveney"},"license":"MIT","bugs":{"url":"https://github.com/carbonorm/barrelsby/issues"},"homepage":"https://github.com/carbonorm/barrelsby#readme","dependencies":{"@types/yargs":"^17.0.10","signale":"^1.4.0","yargs":"^17.4.1"},"devDependencies":{"@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/mock-fs":"^4.13.1","@types/node":"^18.0.0","@types/rimraf":"^3.0.2","@types/signale":"^1.4.2","@types/sinon":"^10.0.6","better-console":"^1.0.1","dir-compare":"^4.0.0","fs-extra":"^10.0.0","jest":"^27.4.4","mock-fs":"^5.1.2","prettier":"^2.6.2","rimraf":"^3.0.2","sinon":"^14.0.0","snyk":"^1.858.0","ts-jest":"^27.1.4","ts-node":"^10.7.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.5.3"},"bin":{"barrelsby":"bin/cli.js"},"engine":{"node":">=0.10"},"contributors":[{"name":"Ben Coveney","email":"bencoveney@gmail.com","url":"https://github.com/bencoveney"},{"name":"Noah","email":"bitforger.huyv0@8shield.net","url":"https://github.com/bitforger"}],"engines":{"node":">=6.0.0"},"_id":"@carbonorm/barrelsby@0.0.3","gitHead":"f8b35befcbadb0213f3acd959b32074c72cb7b8c","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-MZBkSFGq4iqto8bXRC1NngDmyta/0DlSdBY3wFPpB3J8BZ+IRYISdLbQM93epctAeukvQ0gHtv7lFQoJKM8VCA==","shasum":"5eb2fa58702a63aa4ffe44a7595d35ae26ec2738","tarball":"https://registry.npmjs.org/@carbonorm/barrelsby/-/barrelsby-0.0.3.tgz","fileCount":49,"unpackedSize":100401,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC23R0LbMykIiWT2gjnOQQbik75C/2jJEZahzSySYZ6nwIgVvXCzTZSQaXZ1ogUftoCtwDQSOrztwL3ic1ndhQMuJU="}]},"_npmUser":{"name":"richardtylermiles","email":"tmiles199@gmail.com"},"directories":{},"maintainers":[{"name":"richardtylermiles","email":"tmiles199@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/barrelsby_0.0.3_1709664888565_0.7432568449665198"},"_hasShrinkwrap":false},"1.0.0":{"name":"@carbonorm/barrelsby","version":"1.0.0","description":"Automatic TypeScript barrels for your entire code base","main":"index.js","scripts":{"build":"tsc","clean":"rimraf bin/ && rimraf test/**/output/**","prettier:fix":"prettier --write \"src/**/*.ts\"","lint":"tslint --project tsconfig.json -t stylish","integration-test":"ts-node test/src.ts","test":"jest","synk":"SNYK_CONFIG_ORG='barrelsby'; snyk test"},"repository":{"type":"git","url":"git+https://github.com/carbonorm/barrelsby.git"},"keywords":["TypeScript","Barrel","Module","Barrelsby"],"author":{"name":"Ben Coveney","email":"bencoveney@gmail.com","url":"https://github.com/bencoveney"},"license":"MIT","bugs":{"url":"https://github.com/carbonorm/barrelsby/issues"},"homepage":"https://github.com/carbonorm/barrelsby#readme","dependencies":{"@types/yargs":"^17.0.10","signale":"^1.4.0","yargs":"^17.4.1"},"devDependencies":{"@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/mock-fs":"^4.13.1","@types/node":"^18.0.0","@types/rimraf":"^3.0.2","@types/signale":"^1.4.2","@types/sinon":"^10.0.6","better-console":"^1.0.1","dir-compare":"^4.0.0","fs-extra":"^10.0.0","jest":"^27.4.4","mock-fs":"^5.1.2","prettier":"^2.6.2","rimraf":"^3.0.2","sinon":"^14.0.0","snyk":"^1.858.0","ts-jest":"^27.1.4","ts-node":"^10.7.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.5.3"},"bin":{"barrelsby":"bin/cli.js"},"engine":{"node":">=0.10"},"contributors":[{"name":"Ben Coveney","email":"bencoveney@gmail.com","url":"https://github.com/bencoveney"},{"name":"Noah","email":"bitforger.huyv0@8shield.net","url":"https://github.com/bitforger"},{"name":"Richard Miles","email":"richard@miles.systems","url":"https://github.com/carbonorm"}],"engines":{"node":">=6.0.0"},"_id":"@carbonorm/barrelsby@1.0.0","gitHead":"f8b35befcbadb0213f3acd959b32074c72cb7b8c","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-e39/6+5WMhkMtsdpuZZ29iUkdmvG/dttxehBDMYNW+c6+ftAU8tZd4wGs4F1duDRTUZXdMF7fe95aD3iesFkbQ==","shasum":"5c22c1a9ac03bd316d09731f3b8767d215635cb3","tarball":"https://registry.npmjs.org/@carbonorm/barrelsby/-/barrelsby-1.0.0.tgz","fileCount":118,"unpackedSize":167632,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHdicfeSjiaMoh3SrRgfNrOxCBGUzLLDuyssoGWR7dpwIhAN/CxWj/LU2d1As+LR14ToVpoZQZO5TWDumzAIax11/d"}]},"_npmUser":{"name":"richardtylermiles","email":"tmiles199@gmail.com"},"directories":{},"maintainers":[{"name":"richardtylermiles","email":"tmiles199@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/barrelsby_1.0.0_1709665707484_0.3102101499442176"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-05T18:54:48.462Z","0.0.3":"2024-03-05T18:54:48.741Z","modified":"2024-03-05T19:08:28.227Z","1.0.0":"2024-03-05T19:08:27.705Z"},"maintainers":[{"name":"richardtylermiles","email":"tmiles199@gmail.com"}],"description":"Automatic TypeScript barrels for your entire code base","homepage":"https://github.com/carbonorm/barrelsby#readme","keywords":["TypeScript","Barrel","Module","Barrelsby"],"repository":{"type":"git","url":"git+https://github.com/carbonorm/barrelsby.git"},"contributors":[{"name":"Ben Coveney","email":"bencoveney@gmail.com","url":"https://github.com/bencoveney"},{"name":"Noah","email":"bitforger.huyv0@8shield.net","url":"https://github.com/bitforger"},{"name":"Richard Miles","email":"richard@miles.systems","url":"https://github.com/carbonorm"}],"author":{"name":"Ben Coveney","email":"bencoveney@gmail.com","url":"https://github.com/bencoveney"},"bugs":{"url":"https://github.com/carbonorm/barrelsby/issues"},"license":"MIT","readme":"# ![Barrelsby Logo](https://github.com/bencoveney/barrelsby/blob/master/img/logo.png?raw=true)\n\nAutomatically create TypeScript barrels for your entire code base.\n\n[![npm version](https://badge.fury.io/js/barrelsby.svg)](https://badge.fury.io/js/barrelsby)\n[![Node.js CI](https://github.com/bencoveney/barrelsby/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/bencoveney/barrelsby/actions/workflows/node.js.yml)\n[![CodeQL](https://github.com/bencoveney/barrelsby/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)](https://github.com/bencoveney/barrelsby/actions/workflows/codeql-analysis.yml)\n\n## About Barrels\n\nBarrels are files that rollup exports from several modules into a single convenient module\ntypically named `index.ts`. They tend to help simplify large blocks of import statements at the top\nof files and help to group up related functionality.\n\nA barrel file looks like this:\n\n```TypeScript\nexport * from \"./DropDown\";\nexport * from \"./TextBox\";\nexport * from \"./CheckBox\";\nexport * from \"./DateTimePicker\";\nexport * from \"./Slider\";\n```\n\nIt can help you go from messy imports like this:\n\n```TypeScript\nimport {DropDown} from \"./src/controls/DropDown\";\nimport {TextBox} from \"./src/controls/TextBox\";\nimport {CheckBox} from \"./src/controls/CheckBox\";\nimport {DateTimePicker} from \"./src/controls/DateTimePicker\";\nimport {Slider} from \"./src/controls/Slider\";\n```\n\n...to something tidier like this:\n\n```TypeScript\nimport {DropDown, TextBox, CheckBox, DateTimePicker, Slider} from \"./src/controls\";\n```\n\n...or even this:\n\n```TypeScript\nimport * as Controls from \"./src/controls/index\";\n```\n\n### More Reading\n\n* [TattooCoder Blog](http://tattoocoder.com/angular2-barrels/)\n\n### Barrelsby Articles\n\n* [Rupesh Tiwari Blog](http://rupeshtiwari.com/create-barrel/)\n* [Medium Article](https://medium.com/@klauskpm/do-a-barrel-export-aa5b79b76b05)\n\n### Alternatives\n\n* [Barrelbot](https://github.com/sw-yx/barrelbot)\n* [creeate-index](https://github.com/gajus/create-index)\n\n## Usage\n\nTo install Barrelsby:\n\n```\nnpm install --save-dev barrelsby\n```\n\nTo run barrelsby first add a script to the `package.json` file:\n\n```json\n{\n  \"scripts\": {\n    \"generate-barrels\": \"barrelsby --delete\"\n  }\n}\n```\n\nYou can now generate barrels:\n\n```\nnpm run generate-barrels\n```\n\n## Configuration Options\n\nBarrelsby accepts a number of options to help refine how your barrels are created. These options\ncan be configured from the command line or using a configuration file.\n\n### `-c [path]` or `--config [path]`\n\nSpecifies the location of the barrelsby configuration file. This file must be a `.json` file. You\ncan include any of the configuration options using their long name.\n\n### `-d [path...]` or `--directory [path...]`\n\nSpecifies a list of root directories where barrels will be created from. Uses the current directory\nby default.\n\n**Note**: This is backwards compatible with previous versions. Existing configuration files will be\nparsed correctly. The following two json files will behave identically.\n\n```json lines\n{\n  \"directory\": \"./src\"\n}\n\n{\n  \"directory\": [\"./src\"]\n}\n```\n\n### `-D` or `--delete`\n\nDeletes any existing barrels encountered by barrelsby. Disabled by default.\n\n### `-e [regex...]` or `--exclude [regex...]`\n\nExcludes any files whose paths match any of the specified regular expressions.\n\n### `-E` or `--exportDefault`\n\nAlso export the default export of the file. Currently works only with the `flat` mode.\n\n```TypeScript\nexport * from \"./barrel\";\nexport * from \"./barrel\";\nexport { default as barrel } from \"./barrel\";\n```\n\n### `-h` or `--help`\n\nDisplays help information on the command line arguments that barrelsby accepts.\n\n### `-i [regex...]` or `--include [regex...]`\n\nOnly include files whose paths match any of the specified regular expressions.\n\n### `-l [mode]` or `--location [mode]`\n\nThe mode that barrelsby should use to determine where which directories to create barrels in.\nDefaulted to *top*.\n\n- `top` only creates a barrel in the target directory.\n- `below` creates a barrel in every directory just below the target directory.\n- `all` creates a barrel in every directory below (and including) the target directory.\n- `replace` only creates barrels in directories where one already existed.\n- `branch` creates a barrel in every directory that contains other directories.\n\n### `-L` or `--local`\n\nEnable this to prevent barrels including modules that exist in the same directory, rather\nthan recursively searching child directories.\n\n### `-n [name]` or `--name [name]`\n\nSpecifies the name to use for creating new barrels (and identifying old ones). `.ts` wil be\nappended if not included in the name. Barrels names will be defaulted to `index.ts`.\n\n### `-s [mode]` or `--structure [mode]`\n\nThe structure that barrelsby should create inside the barrels. Defaulted to *flat*.\n\n#### `flat`\n\nExports modules without any nesting.\n\n```TypeScript\nexport * from \"./barrel\";\nexport * from \"./index\";\nexport * from \"./directory2/script\";\nexport * from \"./directory2/directory4/deeplyNested\";\nexport * from \"./directory3/program\";\n```\n\n#### `filesystem`\n\nExports modules as a nested structure that matches the file system directories.\n\n```TypeScript\nimport * as barrelts from \"./barrel\";\nimport * as directory2directory4deeplyNestedts from \"./directory2/directory4/deeplyNested\";\nimport * as directory2scriptts from \"./directory2/script\";\nimport * as directory3programts from \"./directory3/program\";\nimport * as indexts from \"./index\";\nexport {barrelts as barrel};\nexport const directory2 = {\n  directory4: {\n    deeplyNested: directory2directory4deeplyNestedts,\n  },\n  script: directory2scriptts,\n};\nexport const directory3 = {\n  program: directory3programts,\n};\nexport {indexts as index};\n```\n\n### `-q` or `--singleQuotes`\n\nUse 'single quotes' in the generated barrel files instead of the default \"double quotes\".\n\n### `-S` or `--noSemicolon`\n\nOmit semicolons from the end of lines in the generated barrel files.\n\n### `-H` or `--noHeader`\n\nOmit adding a header comment to the top of the barrel file.\n\n### `-v` or `--version`\n\nDisplay the barrelsby version number.\n\n### `-V` or `--verbose`\n\nDisplay additional debug information.\n\n## Requirements\n\nRequires node v6.0.0 or greater for ES6 syntax.\n\n## Contributing\n\nSee CONTRIBUTING.md\n","readmeFilename":"README.md"}