metaplex-foundation / auctioneer-template

Template program for users to build their own Auctioneer
GNU Affero General Public License v3.0
1 stars 1 forks source link

Would like to recreate it in an anchor workspace ? #2

Open 0xPratik opened 2 years ago

0xPratik commented 2 years ago

Can we have a use template button with an anchor workspace setup so that folks can fork it and use it.

staccDOTsol commented 1 year ago

Yes, you can create a template repository on GitHub and then use Anchor CLI to create a new Anchor workspace from that template. Here are the steps you can follow:

  1. Create a new repository on GitHub and add your code to it.

  2. Go to the repository settings and click on the "Template repository" checkbox.

  3. Install Anchor CLI by running the following command in your terminal:

    npm install -g @project-serum/anchor-cli
  4. Clone the template repository to your local machine:

    git clone https://github.com/your-username/your-repo-name.git
  5. Create a new Anchor workspace from the template by running the following command:

    anchor init --from-template your-username/your-repo-name

    This will create a new Anchor workspace with the same code as your template repository.

  6. You can now make changes to the code in your new workspace and push them to your own repository.

  7. To use the template, others can simply click on the "Use this template" button on your GitHub repository and create a new repository from the template.

I hope this helps! Let me know if you have any questions.