Skip to content

Commit 3ce6439

Browse files
committed
222: merge target
2 parents 0e252c6 + 4a7a8b2 commit 3ce6439

File tree

349 files changed

+3018
-4571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

349 files changed

+3018
-4571
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
text eol=lf

.github/CODEOWNERS

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
* @Mathys-Gasnier
55

66
# Code maintainers
7-
/src/ @psychlone77 @saminjay
7+
/src/ @psychlone77 @saminjay @Mathys-Gasnier
88

99
# Snippets maintainers
10-
/snippets @Mathys-Gasnier
10+
/snippets @majvax @Mathys-Gasnier
11+
/snippets/javascript @psychlone77 @saminjay
12+
/snippets/python @psychlone77 @saminjay
13+
/snippets/cpp @saminjay
1114

1215

1316
# ---------- What is a maintainer ----------

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
<!-- **ANY PULL REQUEST NOT FOLLOWING GUIDELINES OR NOT INCLUDING A DESCRIPTION WILL BE CLOSED !** -->
2+
13
# Description
24

3-
<!-- Please include a summary of your changes. -->
5+
<!-- Include a summary of your changes. -->
46

57
## Type of Change
68

.github/workflows/consolidate-snippets.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ dist-ssr
2323
*.njsproj
2424
*.sln
2525
*.sw?
26+
27+
# Consolidated snippets
28+
public/consolidated
29+
public/icons

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
"bracketSpacing": true,
88
"bracketSameLine": false,
99
"arrowParens": "always",
10-
"endOfLine": "lf",
1110
"jsxSingleQuote": false
1211
}

CONTRIBUTING.md

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,89 @@ You can contribute in two main ways:
1111

1212
## Improving the code
1313

14-
If you have a feature request or want to fix a bug, feel free to:
14+
### How to report bugs
1515

16-
- [Open an Issue](https://github.com/dostonnabotov/quicksnip/issues) to let us know what’s up.
17-
- [Send a Pull Request](https://github.com/dostonnabotov/quicksnip/pulls) with your changes.
16+
If you spot a bug in the codebase or issues with the documentation, please open up a [GitHub issue](https://github.com/dostonnabotov/quicksnip/issues) detailing the problem before creating a PR. Once confirmed with maintainers, you can then create a PR.
17+
18+
### How to propose new features
19+
20+
If you are interested in proposing new features, please open up a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions) with details for the proposed feature.
21+
22+
Please do not create a PR for a new feature without first discussing it with the maintainers. If you create a PR for a new feature without discussing it first, then your PR will be closed.
23+
24+
---
25+
26+
## Snippets Guidelines
27+
28+
### Snippet Tags
29+
30+
- Tags must describe the snippet with simple word.
31+
32+
Here's an example:
33+
34+
```md
35+
---
36+
title: Convert Number to Currency
37+
description: Converts a number to a currency format with a specific locale.
38+
author: axorax
39+
tags: number,currency
40+
---
41+
```
42+
43+
**Do not use generic keywords or the language itself as a tag `utility` or `javascript`!**
44+
45+
### Snippet Format
46+
47+
**All** snippets should follow the following structure:
48+
49+
- A `code` segment, containing a function with the actual snippet functionnality
50+
- An `example` segement, containing one or more examples of use
51+
52+
Example in javascript:
53+
```js
54+
function example(x) {
55+
return x * 2;
56+
}
57+
58+
// Usage:
59+
example(5) // Returns: 10
60+
```
61+
62+
If your function doesn't return anything just show how to use it. If the result of your function is too complicated to be expressed in a single comment, your snippet is probably too complex to begin with.
63+
64+
### Snippet boundaries
65+
66+
To ensure your snippet isn’t refused, consider these questions:
67+
- **Does the standard library of my language provide an easy way of doing this ?**
68+
- **Does that snippet not have a real, and practical use case ?**
69+
- **Could it be split into separate parts to be better understood ?**
70+
71+
If any answer is yes, then your snippet will most likely get rejected.
1872

1973
---
2074

2175
## Adding Snippets
2276

2377
### Adding a New Snippet
2478

25-
To add a new code snippet:
79+
1. **Ensure your snippet match [guidelines](#snippets-guidelines)**
2680

27-
1. **Navigate to the relevant folder:**
81+
2. **Navigate to the relevant folder:**
2882

2983
- Go to the `/snippets` folder in the root directory.
3084
- Locate the folder for the programming language of your snippet, such as `javascript` or `python`.
3185

32-
2. **Choose the correct category:**
86+
3. **Choose the correct category:**
3387

3488
- Within the language folder, find the relevant category folder for your snippet.
3589
- If no suitable category exists, refer to [Adding a New Category](#adding-a-new-category).
3690

37-
3. **Create a markdown file:**
91+
4. **Create a markdown file:**
3892

3993
- Create a new file with a `.md` extension.
4094
- Name the file appropriately, keeping it descriptive and concise.
4195

42-
4. **Add your snippet:**
96+
5. **Add your snippet:**
4397

4498
- Use the following format to structure your snippet:
4599

@@ -63,7 +117,7 @@ Here’s an example for JavaScript:
63117
title: Format Date
64118
description: Formats a date in 'YYYY-MM-DD' format.
65119
author: dostonnabotov
66-
tags: javascript,date,format
120+
tags: date,format
67121
---
68122

69123
```js
@@ -74,11 +128,11 @@ console.log(formatDate(new Date())); // Output: '2024-12-10'
74128
```
75129
````
76130

77-
5. **Use syntax highlighting:**
131+
6. **Use syntax highlighting:**
78132
- Enclose your code with triple backticks (```).
79133
- Specify the language after the first set of backticks for syntax highlighting.
80134

81-
6. **Test your snippet:**
135+
7. **Test your snippet:**
82136
- Ensure your code runs as expected. \
83137
To test that your snippets are formatted correctly use the `snippets:check` script:
84138
```
@@ -87,11 +141,11 @@ console.log(formatDate(new Date())); // Output: '2024-12-10'
87141
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
88142
89143
---
90-
To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
144+
To preview the snippets, start the vite server using:
91145
```
92-
$ npm run snippets:consolidate
146+
$ npm run dev
93147
```
94-
It will update the snippets in the `/public` folder, making them available to the frontend.
148+
It will use HMR to update the snippets in the `/public` folder, making them available to the frontend.
95149
96150
Expected file structure:
97151
@@ -193,6 +247,6 @@ If you want to introduce a new programming language, here's how to do it:
193247

194248
Whether you’re fixing a tiny typo, writing a new snippet, or dreaming up big features, every bit counts! 🛠️
195249

196-
If you have any questions or need help, feel free to open an issue or tag me.
250+
If you have any questions or need help, feel free to open a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions).
197251

198252
Happy coding! 💻✨

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ Be sure to check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file for detailed g
2323

2424
### Improving the code
2525

26-
Got a feature idea or bug fix? Here's how you can contribute:
26+
- **Reporting bugs**
2727

28-
- [Open an issue](https://github.com/dostonnabotov/quicksnip/issues) to share your ideas or report a bug.
29-
- [Send a pull request](https://github.com/dostonnabotov/quicksnip/pulls) with your changes.
28+
- If you spot a bug in the codebase or issues with the documentation, please open up a [GitHub issue](https://github.com/dostonnabotov/quicksnip/issues) detailing the problem before creating a PR.
29+
- Once confirmed with maintainers, you can then create a PR.
30+
31+
- **Proposing new features**
32+
33+
- If you are interested in proposing new features, please open up a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions) with details for the proposed feature.
34+
- Please do **not** create a PR for a new feature without first discussing it with the maintainers. If you create a PR for a new feature without discussing it first, then your PR will be closed.
3035

3136
### Adding a Snippet
3237

@@ -58,7 +63,7 @@ Here's an example for JavaScript:
5863
title: Format Date
5964
description: Formats a date in 'YYYY-MM-DD' format.
6065
author: dostonnabotov
61-
tags: javascript,date,format
66+
tags: date,format
6267
---
6368

6469
```js
@@ -99,11 +104,13 @@ For more details about adding new categories or programming languages, check out
99104

100105
To keep things smooth and consistent, please:
101106

102-
- Follow the formatting rules described above.
103-
- Include all mandatory fields in the snippet.
104-
- Test your snippet to ensure it works as expected.
107+
- [x] Follow the style and contribution guidelines of this project.
108+
- [x] Include all mandatory fields in the snippet.
109+
- [x] Test your snippet to ensure it works as expected.
110+
111+
Following these guidelines helps us (and everyone else) review and merge your contributions faster.
105112

106-
Following these guidelines helps me (and everyone else) review and merge your contributions faster.
113+
**If you fail to meet the guidelines, your PR will most likely get rejected.**
107114

108115
## License
109116

VISION.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
11
# Vision for QuickSnip
22

3-
Will be updating soon...
3+
## What is QuickSnip?
4+
5+
QuickSnip is an open-source tool designed for developers who want to organize, search, and share code snippets. It aims to streamline the coding process by providing a centralized platform for snippet management.
6+
7+
## Core Principles
8+
9+
- **Developer Focused**: Focus on features that truly improve developer productivity.
10+
11+
- **Open and Extensible**: Encourage community contributions and integrations.
12+
13+
- **Lightweight and Fast**: Keep performance high and avoid unnecessary complexity.
14+
15+
## Our Goals
16+
17+
- Seamless snippet management without turning into an overly complex tool
18+
19+
- Enable collaboration and sharing while respecting user privacy and customization needs.
20+
21+
We do **NOT** aim to be:
22+
23+
- a component library
24+
- a documentation
25+
26+
## QuickSnip Roadmap
27+
28+
### v1.0 (Launching Soon)
29+
30+
- [x] A new snippets storage system for better maintainability and scalability
31+
- [ ] Search functionality
32+
- [ ] A support for frameworks and libraries
33+
- [ ] An ability to share snippets with others
34+
- [ ] A basic SEO (Search Engine Optimization)
35+
36+
### v2.0 (Planned Vision)
37+
38+
- [ ] An ability to have private snippets with personal account
39+
- [ ] Improved search functionality with filters
40+
- [ ] An improved SEO (Search Engine Optimization)
41+
42+
### Potential Future Ideas
43+
44+
- [ ] Plugins for IDEs like VS Code and JetBrains
45+
- [ ] Enterprise-grade support for larger organizations
46+
47+
## Disclaimer on Future Plans
48+
49+
This roadmap outlines our current vision for QuickSnip and may evolve based on user feedback, community contributions, and shifting priorities. We welcome your input and encourage you to help shape QuickSnip’s future.
50+
51+
## Future Vision
52+
53+
QuickSnip aims to become the preferred platform for developers to store, retrieve, and collaborate on code snippets.
54+
55+
Explore our [GitHub Releases](https://github.com/dostonnabotov/quicksnip/releases) for updates and join us on this journey.

cspell-dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
quicksnip
2+
slugifyed

0 commit comments

Comments
 (0)