Skip to content

Commit 27d8016

Browse files
committed
Refactor README content
1 parent 6e7b4dd commit 27d8016

File tree

2 files changed

+36
-82
lines changed

2 files changed

+36
-82
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,25 @@ If you want to introduce a new programming language, here's how to do it:
241241

242242
---
243243

244+
## Testing Snippets
245+
246+
To test that your snippets are formatted correctly use the following script:
247+
248+
```
249+
$ npm run snippets:check
250+
```
251+
252+
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
253+
254+
---
255+
To preview the snippets, you need to consolidate them, use the following script:
256+
257+
```
258+
$ npm run snippets:consolidate
259+
```
260+
261+
It will update the snippets in the `/public` folder, making them available to the frontend.
262+
244263
## Final Notes
245264

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

README.md

Lines changed: 17 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -12,105 +12,40 @@ An open-source project that categorizes handy code snippets across various progr
1212

1313
![Website preview](/public/preview.png)
1414

15-
## How to contribute
15+
## How to Contribute
1616

1717
Want to help make QuickSnip even better? You can contribute by:
1818

1919
- **Improving the Code**: Fix bugs, suggest new features, or optimize the project.
2020
- **Adding New Snippets**: Share your favorite snippets to grow the database.
2121

22-
Be sure to check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file for detailed guidelines.
22+
Check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file for detailed contribution guidelines.
2323

24-
### Improving the code
24+
## General Rules
2525

26-
- **Reporting bugs**
26+
To keep everything smooth and consistent, please:
2727

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.
28+
- [x] Follow the project’s style and contribution rules.
29+
- [x] Be kind and respectful to others.
30+
- [x] If you’re unsure, ask questions.
3031

31-
- **Proposing new features**
32+
Following these rules helps us build an awesome community. 🚀
3233

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.
34+
## Third-Party
3535

36-
### Adding a Snippet
36+
We love to see the creativity of our community! If you build something using QuickSnip, let us know. Here are some featured examples:
3737

38-
The snippets database is located in the `/snippets` folder.
38+
- ⚡️ [**Raycast Extension**](https://www.raycast.com/anders_morille/quicksnip): An extension to browse and use QuickSnip snippets directly from Raycast. (Thanks to the creator: [@lille-morille](https://github.com/lille-morille))
3939

40-
1. Find the relevant language folder.
40+
If you’d like to create your own extension or tool:
4141

42-
2. Locate the appropriate category folder for your snippet.
42+
- [x] Please ensure it adheres to our project’s licensing and attribution requirements.
43+
- [x] Please link to the [original QuickSnip repository](https://github.com/dostonnabotov/quicksnip) in your extension/tool to attribute the source.
44+
- [x] Share your work with us — we’d be thrilled to feature it!
4345

44-
3. Create a markdown file and add your snippet using the following format:
46+
## Project Vision
4547

46-
````md
47-
---
48-
title: Name of the snippet
49-
description: A short explanation of what the snippet does
50-
tags: tag1, tag2, tag3
51-
author: your-github-username
52-
---
53-
54-
```lang
55-
// Your code here
56-
```
57-
````
58-
59-
Here's an example for JavaScript:
60-
61-
````md
62-
---
63-
title: Format Date
64-
description: Formats a date in 'YYYY-MM-DD' format.
65-
author: dostonnabotov
66-
tags: date,format
67-
---
68-
69-
```js
70-
const formatDate = (date) => date.toISOString().split('T')[0];
71-
72-
// Usage:
73-
console.log(formatDate(new Date())); // Output: '2024-12-10'
74-
```
75-
````
76-
77-
Expected file structure:
78-
79-
```md
80-
/snippets
81-
|- language
82-
|- category-name
83-
|- your-snippet-here.md
84-
```
85-
86-
> Please do **NOT** add or edit anything in `/public` folder. It will be used for consolidating snippets.
87-
88-
To test that your snippets are formatted correctly use the `snippets:check` script:
89-
```
90-
$ npm run snippets:check
91-
```
92-
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
93-
94-
---
95-
To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
96-
```
97-
$ npm run snippets:consolidate
98-
```
99-
It will update the snippets in the `/public` folder, making them available to the frontend.
100-
101-
For more details about adding new categories or programming languages, check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file.
102-
103-
## Guidelines for Contributions
104-
105-
To keep things smooth and consistent, please:
106-
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.
112-
113-
**If you fail to meet the guidelines, your PR will most likely get rejected.**
48+
For a detailed look into our goals, future direction, and aspirations, see the [VISION.md](/VISION.md) file.
11449

11550
## License
11651

0 commit comments

Comments
 (0)