{"_id":"@arondilbe/monorepo-package-generator","_rev":"3-b0a780c74ada7faaf0f868b8d6cc3fc7","name":"@arondilbe/monorepo-package-generator","dist-tags":{"latest":"2.1.1"},"versions":{"1.0.0":{"name":"@arondilbe/monorepo-package-generator","version":"1.0.0","description":"The package 'package-generator' goal is to provide an easy to use tool to generate packages for monorepo. The generated packages are based on sample files and folders.","keywords":["package","generator","generation"],"homepage":"https://github.com/arondilbe/monorepo-package-generator#readme","bugs":{"url":"https://github.com/arondilbe/monorepo-package-generator/issues","email":"arondilbe@gmail.com"},"license":"MIT","author":{"name":"ArondilBe","url":"arondilbe@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/arondilbe/monorepo-package-generator.git"},"main":"./build/index.js","type":"commonjs","packageManager":"yarn@4.1.1","bin":{"generatePackage":"bin/generatePackage.js"},"scripts":{"build":"tsc -b tsconfig.json","clean:build":"rm -rf ./build/","test":"jest","commit":"cz","package:generate":"node ./bin/generatePackage.js --config ./packageGenerationExample.config.json"},"dependencies":{"@arondilbe/string-parameters-parser":"^1.0.1","chalk":"^4.1.2","inquirer":"^8.2.6","yargs":"^17.7.2"},"devDependencies":{"@types/inquirer":"^9.0.7","@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/yargs":"^17.0.32","@typescript-eslint/eslint-plugin":"^7.3.1","@typescript-eslint/parser":"^7.3.1","commitizen":"^4.3.0","cz-conventional-changelog":"^3.3.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","typescript":"^5.4.2","typescript-eslint":"^7.3.1"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"types":"./build/index.d.ts","gitHead":"0056333a6231b0cabcc11e34714a5f7219e02dea","_id":"@arondilbe/monorepo-package-generator@1.0.0","_nodeVersion":"20.11.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-uS/s80aJxyANjpQG/8FkPvalHyOo1ZGebQ/HvWi1uLeHEo9FbQ5P4m4MXU/GOYKoKjc8uCCfxpgNPyeXEZ51rQ==","shasum":"804fd242decbbd48d3e54cced69d424df0308bbe","tarball":"https://registry.npmjs.org/@arondilbe/monorepo-package-generator/-/monorepo-package-generator-1.0.0.tgz","fileCount":118,"unpackedSize":184999,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtm+A39xON6cnSC7PLsB271Dtzk0UpEZyANVXffpgUjwIgEqI9eMmleBZ4gBHnebQo/kd/evNzCNL0nUlONB5XXuw="}]},"_npmUser":{"name":"arondilbe","email":"arondilbe@gmail.com"},"directories":{},"maintainers":[{"name":"arondilbe","email":"arondilbe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/monorepo-package-generator_1.0.0_1711136039623_0.14904198925834877"},"_hasShrinkwrap":false},"2.0.0":{"name":"@arondilbe/monorepo-package-generator","version":"2.0.0","description":"The package 'monorepo-package-generator' goal is to provide an easy to use tool to generate packages for monorepo. The generated packages are based on sample files and folders.","keywords":["package","generator","generation","monorepo"],"homepage":"https://github.com/arondilbe/monorepo-package-generator#readme","bugs":{"url":"https://github.com/arondilbe/monorepo-package-generator/issues","email":"arondilbe@gmail.com"},"license":"MIT","author":{"name":"ArondilBe","url":"arondilbe@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/arondilbe/monorepo-package-generator.git"},"exports":"./build/index.js","type":"module","packageManager":"yarn@4.1.1","bin":{"generatePackage":"bin/generatePackage.js"},"scripts":{"build":"tsc -b tsconfig.json","build:clean":"rm -rf ./esm/","test":"jest","commit":"cz","package:generate":"node ./bin/generatePackage.js generate-package --config ./packageGenerationExample.config.json"},"dependencies":{"@arondilbe/string-parameters-parser":"^1.0.2","chalk":"^4.1.2","yargs":"^17.7.2"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/yargs":"^17.0.32","@typescript-eslint/eslint-plugin":"^7.4.0","@typescript-eslint/parser":"^7.4.0","commitizen":"^4.3.0","cz-conventional-changelog":"^3.3.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","typescript":"^5.4.3","typescript-eslint":"^7.4.0"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"gitHead":"f4937ae479e409acc678f1d3716cc1b6fc093c7b","_id":"@arondilbe/monorepo-package-generator@2.0.0","_nodeVersion":"20.11.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-/N8e6M/sW+0t2j4eTALQSwi854ugfU3cl+5jSTDgcyC9YmMDrKyp8I1qUU1v+HIgyRVDbekjiUkGxrfbA7EtCA==","shasum":"7d5860a4cf67aa4777ea037ff5e410c36ebfad57","tarball":"https://registry.npmjs.org/@arondilbe/monorepo-package-generator/-/monorepo-package-generator-2.0.0.tgz","fileCount":95,"unpackedSize":142727,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVh1nzdXAhQZAJYs4zpVcb1At+9sizTk6cIXaofulXtAIhAPciymYR69jCAFLrgIV8zzCEudG6DQ14Zv9JqczkF1cF"}]},"_npmUser":{"name":"arondilbe","email":"arondilbe@gmail.com"},"directories":{},"maintainers":[{"name":"arondilbe","email":"arondilbe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/monorepo-package-generator_2.0.0_1712127408798_0.28804623493600223"},"_hasShrinkwrap":false},"2.1.0":{"name":"@arondilbe/monorepo-package-generator","version":"2.1.0","description":"The package 'monorepo-package-generator' goal is to provide an easy to use tool to generate packages for monorepo. The generated packages are based on sample files and folders.","keywords":["package","generator","generation","monorepo"],"homepage":"https://github.com/arondilbe/monorepo-package-generator#readme","bugs":{"url":"https://github.com/arondilbe/monorepo-package-generator/issues","email":"arondilbe@gmail.com"},"license":"MIT","author":{"name":"ArondilBe","url":"arondilbe@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/arondilbe/monorepo-package-generator.git"},"exports":"./build/index.js","type":"module","packageManager":"yarn@4.1.1","bin":{"generatePackage":"bin/generatePackage.js"},"scripts":{"build":"tsc -b tsconfig.json","build:clean":"rm -rf ./esm/","test":"node --no-warnings --experimental-vm-modules node_modules/jest/bin/jest.js","commit":"cz","package:generate":"node ./bin/generatePackage.js generate-package --config ./packageGenerationExample.config.json","release:create":"npm version minor && changelog","publish":"npm publish"},"dependencies":{"@arondilbe/string-parameters-parser":"^1.0.2","chalk":"^5.3.0","yargs":"^17.7.2"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/yargs":"^17.0.32","@typescript-eslint/eslint-plugin":"^7.4.0","@typescript-eslint/parser":"^7.4.0","commitizen":"^4.3.0","cz-conventional-changelog":"^3.3.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","generate-changelog":"^1.8.0","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","typescript":"^5.4.3","typescript-eslint":"^7.4.0"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"gitHead":"c11f1983f1800e67b6fff913d4acba336f68fb53","_id":"@arondilbe/monorepo-package-generator@2.1.0","_nodeVersion":"20.11.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-SxEQlOBOWUfn/Pgfh/oKlua4I+Ul4m87kVkbCH7E8/YumwlOiA4hON+gDzLsgcub6Zy/rwb1nFg5ZWUr0bVcXQ==","shasum":"7ab7b8bbab75002f7300f6ee082300dd34949bc3","tarball":"https://registry.npmjs.org/@arondilbe/monorepo-package-generator/-/monorepo-package-generator-2.1.0.tgz","fileCount":95,"unpackedSize":145545,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHyicylPBnm1/CRi5tdbXXDf7fzIQZrxDUdRoIDzbgvAiBYbMyr5UN3YWqE7IKKSJFMQ0+LqXfWRevv/dQLF41gxw=="}]},"_npmUser":{"name":"arondilbe","email":"arondilbe@gmail.com"},"directories":{},"maintainers":[{"name":"arondilbe","email":"arondilbe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/monorepo-package-generator_2.1.0_1712727593484_0.11041689883918604"},"_hasShrinkwrap":false},"2.1.1":{"name":"@arondilbe/monorepo-package-generator","version":"2.1.1","description":"The package 'monorepo-package-generator' goal is to provide an easy to use tool to generate packages for monorepo. The generated packages are based on sample files and folders.","keywords":["package","generator","generation","monorepo"],"homepage":"https://github.com/arondilbe/monorepo-package-generator#readme","bugs":{"url":"https://github.com/arondilbe/monorepo-package-generator/issues","email":"arondilbe@gmail.com"},"license":"MIT","author":{"name":"ArondilBe","url":"arondilbe@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/arondilbe/monorepo-package-generator.git"},"exports":"./build/index.js","type":"module","packageManager":"yarn@4.1.1","bin":{"generatePackage":"bin/generatePackage.js"},"scripts":{"build":"tsc -b tsconfig.json","build:clean":"rm -rf ./esm/","test":"node --no-warnings --experimental-vm-modules node_modules/jest/bin/jest.js","commit":"cz","package:generate":"node ./bin/generatePackage.js generate-package --config ./packageGenerationExample.config.json","release:create":"npm version minor && changelog","publish":"npm publish"},"dependencies":{"@arondilbe/string-parameters-parser":"^1.0.2","chalk":"^5.3.0","yargs":"^17.7.2"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/yargs":"^17.0.32","@typescript-eslint/eslint-plugin":"^7.4.0","@typescript-eslint/parser":"^7.4.0","commitizen":"^4.3.0","cz-conventional-changelog":"^3.3.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","generate-changelog":"^1.8.0","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","typescript":"^5.4.3","typescript-eslint":"^7.4.0"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"gitHead":"1c093e722d91547478beacdb1af9d404052da2f5","_id":"@arondilbe/monorepo-package-generator@2.1.1","_nodeVersion":"20.11.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-pVYkNLQEasjENkrrhjfAJDgckpF9wLmehbjX0Sa55Bge0GPmE5cymAZHHKQxpj67Aa1J6Vh3wiDfBcJ0N5s7EQ==","shasum":"d7a08ca38f87955f4b55c60107185f83522cf484","tarball":"https://registry.npmjs.org/@arondilbe/monorepo-package-generator/-/monorepo-package-generator-2.1.1.tgz","fileCount":95,"unpackedSize":145274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICHGGy7h4lvre1m4woVVsD5/yRPNE0dDvGP96o4Icg7YAiA+kEbtb4MO1nn1psQ8cQxOGf54cg/SxPwwRPvM4rygkQ=="}]},"_npmUser":{"name":"arondilbe","email":"arondilbe@gmail.com"},"directories":{},"maintainers":[{"name":"arondilbe","email":"arondilbe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/monorepo-package-generator_2.1.1_1712730162983_0.42663536640219313"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-22T19:33:59.505Z","1.0.0":"2024-03-22T19:33:59.807Z","modified":"2024-04-10T06:22:43.301Z","2.0.0":"2024-04-03T06:56:49.006Z","2.1.0":"2024-04-10T05:39:53.637Z","2.1.1":"2024-04-10T06:22:43.139Z"},"maintainers":[{"name":"arondilbe","email":"arondilbe@gmail.com"}],"description":"The package 'monorepo-package-generator' goal is to provide an easy to use tool to generate packages for monorepo. The generated packages are based on sample files and folders.","homepage":"https://github.com/arondilbe/monorepo-package-generator#readme","keywords":["package","generator","generation","monorepo"],"repository":{"type":"git","url":"git+https://github.com/arondilbe/monorepo-package-generator.git"},"author":{"name":"ArondilBe","url":"arondilbe@gmail.com"},"bugs":{"url":"https://github.com/arondilbe/monorepo-package-generator/issues","email":"arondilbe@gmail.com"},"license":"MIT","readme":"# @arondilbe/monorepo-package-generator\r\n\r\n## Table of Contents\r\n\r\n- [@arondilbe/monorepo-package-generator](#arondilbemonorepo-package-generator)\r\n  - [Table of Contents](#table-of-contents)\r\n  - [About @arondilbe/monorepo-package-generator](#about-arondilbemonorepo-package-generator)\r\n  - [How does it work ?](#how-does-it-work-)\r\n    - [Adding the configuration](#adding-the-configuration)\r\n    - [How to use the package generation command ?](#how-to-use-the-package-generation-command-)\r\n      - [Setting the package parameters](#setting-the-package-parameters)\r\n  - [Breakthrough](#breakthrough)\r\n\r\n## About @arondilbe/monorepo-package-generator\r\n\r\nThe main goal of @arondilbe/monorepo-package-generator is to provide a easy to use tool to generate packages for mono-repositories.\r\n\r\n## How does it work ?\r\n\r\nThe monorepo package generator use sample files and a small configuration to create new packages. It allows the user to generate packages based on some common files which will be used for all new packages and also some specific ones which will be added only if the package to create is from a certain type.\r\n\r\n### Adding the configuration\r\n\r\nIn order to use the command, you'll also need a `.json` configuration file containing some information:\r\n\r\n```json\r\n{\r\n  \"destinationFolderPath\": \"./packages\",\r\n  \"sampleFilesFolderPath\": \"./sampleFilesExample\",\r\n  \"libraryName\": \"@arondilbe\",\r\n  \"packageTypes\": {\r\n    \"mainFolder\": \"packageTypes\",\r\n    \"types\": {\r\n      \"content\": \"content\",\r\n      \"util\": \"util\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nNote that the `packageTypes` property is **optional**. If not defined, **all** files will be **copied** for all new packages.\r\n\r\n- **destinationFolderPath**: `string` The path to the folder were the new packages will be created\r\n- **sampleFilesFolderPath**: `string` The path to the folder containing the files used as models for the new packages\r\n- **libraryName**: `string` A common part to be put before the package name in the package.json file\r\n- **packageTypes**: An object containing information about the package types:\r\n\r\n  - **mainFolder**: `string` The name of the folder containing all the package type folders\r\n  - **types**: `Record<string,string>`: An object containing pairs key/value pairs. The **key** is the **package type** and the **value** is the **folder name**. For instance if you have a package type named **util** which has its files contained in the folder **utilPackage** (the folder should be in the **sample files folder**), you'll have:\r\n\r\n  ```json\r\n  \"packageTypes\": {\r\n    \"mainFolder\": \"packageTypes\",\r\n    \"types\": {\r\n      \"content\": \"content\",\r\n      \"util\": \"util\"\r\n    }\r\n  }\r\n  ```\r\n\r\n### How to use the package generation command ?\r\n\r\nTo launch the package generation you can call the command `generatePackage generate-package`:\r\n\r\n```bash\r\nnpm generatePackage generate-package --config pathToTheConfigFile\r\n```\r\n\r\n```bash\r\nyarn generatePackage generate-package --config pathToTheConfigFile\r\n```\r\n\r\n#### Setting the package parameters\r\n\r\nBy using some command parameters you can define three settings for your package:\r\n\r\n- **The name**: `--name` The name of your package (**mandatory**)\r\n- **The type**: `--type` The type of your package (**optional**). The value should be one of the **keys** defined in **packageTypes**\r\n- **The version**: `--packageVersion`: The version of the package (**optional**)\r\n\r\n```bash\r\nyarn generatePackage generate-package --config pathToTheConfigFile --name newPackage --type myPackageType --packageVersion 0.10\r\n```\r\n\r\nFor more information you check the command help by using the parameter `--help`:\r\n\r\n```bash\r\nyarn generatePackage generate-package --help\r\n```\r\n\r\nIf you want more feedbacks during the package generation you can use the parameter `--verbose`:\r\n\r\n```bash\r\nyarn generatePackage generate-package --config pathToTheConfigFile --name newPackage --type myPackageType --packageVersion 0.10 --verbose\r\n```\r\n\r\nIt will then return a information message after each step of the package generation.\r\n\r\n## Breakthrough\r\n\r\nThe package generation starts when you enter the command. It will then create a **new folder** with the **name** you gave and at the **destination folder** defined in the **configuration file**.\r\n\r\nAfter that it will **copy** all **common** files (or **all** files if you didn't defined any **package type** ).\r\n\r\nIf you defined some **package types** and you specified the **type** of the new **package** it will also copy **all** files contained in the given **package type** folder. If some files with the **same name** and at the **same final location** exist for both **common** and **specific** files, the **specific** ones will replace the **common** ones.\r\n\r\nIf your new package contains a `package.json` file it will modify the **package name** and the **package version** (if you provided one in the command).\r\n","readmeFilename":"README.md"}