Copy-Paste Distribution Tool. Copy paste distribution is becoming increasingly popular, especially in Front-end world with tools like shadcn. This project aims to provide a common foundation for such distribution. Currently tool is tailored for .NET development and based heavily on other .NET tooling:
- Copy a file(s) or folder from a library as a smart-template to central registry on your PC:
copaster copy some-lib/Reactivity.cs- Paste the file in any of your project (
cd app-one):
copaster paste Reactivity.csNow, instead of black-box dependency in your project you have module, that you own. A module that you can freely debug, analyze and customize.
Start by installing it globally using .NET CLI:
dotnet tool install --global Copaster.CliNow, you should be able to see the list of commands by running from anywhere on your computer:
copaster --helpNow you are fully set to start using it on your own libraries and projects!
If you want to test the tool with a working example you can use this repository. The play folder was made specifically for this (and buffer folder is gitignored for the same reason). Let's clone the repo and get started from it:
git clone https://github.com/astorDev/copaster.git && cd copasterLet's copy an example file:
copaster copy play/Reactivity.csNow, let's create an example project in the buffer, just to see the whole picture
dotnet new classlib -o buffer --name Copaster.Buffer With that in place we should be able to cd buffer and paste the Reactivity.cs directly to it's root:
copaster paste Reactivity.csNote that the namespace was also Copaster.Buffer . This is a "smart" part of the template - it runs fix-ns util on the project automatically after copying. The fix-ns util is part of the project, you can find it in this folder
Copaster is based on dotnet new templating functionality. Every copaster template is essentially a dotnet new template, stored in the application's folder.