This is a SvelteKit project designed for managing code snippets. This README provides instructions on how to set up and run the project locally.
Before you begin, ensure you have the following installed:
First, clone the repository to your local machine:
git clone https://github.com/dikshantrajput/snippet-library.git
cd snippet-library
Navigate to the project directory and install the necessary dependencies:
npm install
Copy the contents of the .env.example
file to create your own .env
file:
cp .env.example .env
After copying, make sure to edit the .env
file to configure your environment
variables according to your requirements.
To start the development server, use the following command:
npm run dev
This command will start the SvelteKit application, and you can view it in your
browser at http://localhost:5173
.
To build the project for production, use:
npm run build
This will create an optimized build of your application in the build
directory.
You can preview the production build locally by running:
npm run preview
This will serve your built application on a local server, allowing you to test the production version.
- If you encounter any issues, ensure that your Node.js and npm versions are up to date.
- Check the console for any errors during the build or run process.
-
Fork the Repository: Follow the steps mentioned above to fork the repository.
-
Create a New Branch: Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make Your Changes: Implement the feature or bug fix. Make sure to test your changes thoroughly.
-
Commit Your Changes: After making your changes, commit them with a descriptive message:
git add . git commit -m "Add feature: your feature description"
-
Push to Your Fork: Push your changes to your forked repository:
git push origin feature/your-feature-name
-
Create a Pull Request: Go to the original repository and click on the "New Pull Request" button. Select your branch and create a pull request, describing the changes you made.