Skip to content

Commit c81f95d

Browse files
committed
feature(codelets): rename codelets to snippets everywhere
BREAKING CHANGE: the api paths are also changing ("snippets" instead of "codelets")
1 parent 8143627 commit c81f95d

File tree

217 files changed

+1095
-1033
lines changed

Some content is hidden

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

217 files changed

+1095
-1033
lines changed

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
# [2.5.0](https://github.com/BookmarksDev/bookmarks.dev/compare/2.4.0...2.5.0) (2020-10-23)
4747

48-
### Change codelets to (code) snippets only visually
48+
### Change snippets to (code) snippets only visually
4949

5050

5151
# [2.4.0](https://github.com/BookmarksDev/bookmarks.dev/compare/2.3.1...2.4.0) (2020-08-25)
@@ -99,7 +99,7 @@
9999

100100
### Bug Fixes
101101

102-
* remove unused pipe in codelet-details.component.html ([8f94094](https://github.com/BookmarksDev/bookmarks.dev/commit/8f9409432829d2cc4a53544766714ff359fc3304))
102+
* remove unused pipe in snippet-details.component.html ([8f94094](https://github.com/BookmarksDev/bookmarks.dev/commit/8f9409432829d2cc4a53544766714ff359fc3304))
103103

104104

105105
### Features
@@ -116,8 +116,8 @@
116116

117117
* **fe:** more distances between saved searches in my dashboard ([684c7be](https://github.com/BookmarksDev/bookmarks.dev/commit/684c7be9963a3aeefd5de7a05ce143436d959553))
118118
* **fe:** overflow bootrap dropdown menu in angular expansion panel ([c996aec](https://github.com/BookmarksDev/bookmarks.dev/commit/c996aec0d3377ebabfc17ded70bbbeecc781e350))
119-
* **fe-codelets:** avoid double adding codelets tags reloaded ([52285dc](https://github.com/BookmarksDev/bookmarks.dev/commit/52285dcdae3305729890b8cacf2b4fe70fc5efce))
120-
* **fe-codelets:** avoid double adding of chip and text when selecting chip ([ef06639](https://github.com/BookmarksDev/bookmarks.dev/commit/ef06639cb97d4f1a300d46fd53fdd13f2247ed48))
119+
* **fe-snippets:** avoid double adding snippets tags reloaded ([52285dc](https://github.com/BookmarksDev/bookmarks.dev/commit/52285dcdae3305729890b8cacf2b4fe70fc5efce))
120+
* **fe-snippets:** avoid double adding of chip and text when selecting chip ([ef06639](https://github.com/BookmarksDev/bookmarks.dev/commit/ef06639cb97d4f1a300d46fd53fdd13f2247ed48))
121121

122122

123123
### Features
@@ -136,7 +136,7 @@
136136

137137
### Bug Fixes
138138

139-
* **fe-codelets:** avoid double adding of chip and text when selecting chip ([ef06639](https://github.com/BookmarksDev/bookmarks.dev/commit/ef06639cb97d4f1a300d46fd53fdd13f2247ed48))
139+
* **fe-snippets:** avoid double adding of chip and text when selecting chip ([ef06639](https://github.com/BookmarksDev/bookmarks.dev/commit/ef06639cb97d4f1a300d46fd53fdd13f2247ed48))
140140

141141

142142

@@ -156,7 +156,7 @@
156156
* **github-link:** make github links point to the new BookmarksDev org ([9c2bdfa](https://github.com/BookmarksDev/bookmarks.dev/commit/9c2bdfa98f2018a2ecc30023293c0da41955f1d6))
157157
* **location-exists:** encode the whole url to make sure "+" signs don't get removed ([7dcbdb9](https://github.com/BookmarksDev/bookmarks.dev/commit/7dcbdb99001379666b5fd0fdb0020af23c60141d))
158158
* **mongo:** search domain for saved searches ([e04c58b](https://github.com/BookmarksDev/bookmarks.dev/commit/e04c58b5ef63ad9d00b459914331a082f6454f77))
159-
* **saved-searches-page:** add saved searches for my-codelets ([8f8e3b9](https://github.com/BookmarksDev/bookmarks.dev/commit/8f8e3b9cae9ccdaf00327eb5535132e188d4cd0b))
159+
* **saved-searches-page:** add saved searches for my-snippets ([8f8e3b9](https://github.com/BookmarksDev/bookmarks.dev/commit/8f8e3b9cae9ccdaf00327eb5535132e188d4cd0b))
160160

161161

162162
### Features
@@ -173,7 +173,7 @@
173173
* **fe-save-bookmark-form:** add edit possibility when bookmark already present ([edf5caf](https://github.com/BookmarksDev/bookmarks.dev/commit/edf5cafdea101a842a1c8d309e119a7163c84003))
174174
* **fe-share-bookmark:** add possibility to share bookmark link via email ([e0a6210](https://github.com/BookmarksDev/bookmarks.dev/commit/e0a6210b71126a9fecc38933807dcb23001cb4a2))
175175
* **history-mgt:** add to history when link inside description clicked ([74cc43a](https://github.com/BookmarksDev/bookmarks.dev/commit/74cc43a6dc0b22ca7f2272b9ab5c663b841fa8e5))
176-
* **saving-codelets:** add tags and comment as input strings via query params ([ea1f819](https://github.com/BookmarksDev/bookmarks.dev/commit/ea1f819429e0e0b44965a528de93843863850e90))
176+
* **saving-snippets:** add tags and comment as input strings via query params ([ea1f819](https://github.com/BookmarksDev/bookmarks.dev/commit/ea1f819429e0e0b44965a528de93843863850e90))
177177

178178

179179
### Performance Improvements

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# Bookmarks Manager for Developers & Co
2-
[Bookmarks.dev](https://www.bookmarks.dev) is a **bookmarks and code-snippets manager** created and designed primarily for Developers & Co.
3-
It helps you [save time and nerves when managing your dev bookmarks](https://dev.to/ama/how-i-manage-my-dev-bookmarks-and-save-time-and-nerves-56ae)
4-
and eases [bookmarking of code snippets via Codelets](https://dev.to/ama/bookmarking-code-snippets-with-codelets-3d44). Check our
2+
[Bookmarks.dev](https://www.bookmarks.dev) is a **bookmarks and code-snippets manager** for Developers & Co.
3+
To help you [save time and nerves when managing your dev bookmarks](https://dev.to/ama/how-i-manage-my-dev-bookmarks-and-save-time-and-nerves-56ae)
4+
we have
5+
* [Chromium Extension](https://chrome.google.com/webstore/detail/save-link-to-bookmarksdev/diofdblfhjbpgackifolmboaiccmebjb)
6+
* [Bookmarklet](https://www.bookmarks.dev/howto/bookmarklets)
7+
* []
8+
9+
10+
and eases [bookmarking ans searching of code snippets](https://dev.to/ama/bookmarking-code-snippets-with-codelets-3d44). Check our
511
[HowTo](https://www.bookmarks.dev/howto) page to help you get started:
612

713
[![Save to Bookmarks.dev chrome extension usage](documentation/gif/save-youtube-video-to-bookmarks.dev.gif)](https://www.bookmarks.dev/howto)
814

9-
> Most worthy public bookmarks are published regularly on Github in a [separate repository](https://github.com/CodepediaOrg/bookmarks).
15+
> Worthy public bookmarks are published regularly on Github in a [separate repository](https://github.com/BookmarksDev/bookmarks).
1016
1117
***
1218

@@ -114,7 +120,7 @@ See [Node.js debugging in VS Code with Nodemon](https://github.com/microsoft/vsc
114120
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
115121

116122
## Versioning
117-
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/CodepediaOrg/bookmarks.dev/tags).
123+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BookmarksDev/bookmarks.dev/tags).
118124

119125
## Changelog
120126
The changelog is available in [CHANGELOG.md](CHANGELOG.md)

backend/docs/openapi/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
email: ama@codepedia.org
99
license:
1010
name: License MIT
11-
url: https://github.com/CodepediaOrg/bookmarks.dev-api/blob/develop/LICENSE
11+
url: https://github.com/BookmarksDev/bookmarks.dev-api/blob/develop/LICENSE
1212
version: 2.0.0
1313

1414
servers:
@@ -191,7 +191,7 @@ paths:
191191
language: en
192192
tags: [nodejs, error-handling, expressjs]
193193
publishedOn: 2019-12-02,
194-
sourceCodeURL: https://github.com/CodepediaOrg/bookmarks.dev-api
194+
sourceCodeURL: https://github.com/BookmarksDev/bookmarks.dev-api
195195
description: Shows how you can make your backend ExpressJS REST API cleaner by using custom error handling middleware. Code snippets of before and after refactoring are presented to make the point
196196
descriptionHtml: <p>Shows how you can make your backend ExpressJS REST API cleaner by using custom error handling middleware. Code snippets of before and after refactoring are presented to make the point</p>
197197
userId: 4c617f2b-2bad-498b-a9c6-4e9a8c303798
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
db.codelets.renameCollection("snippets");

backend/src/common/snippets-search.service.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const Codelet = require('../model/codelet');
1+
const Snippet = require('../model/snippet');
22

33
const bookmarksSearchHelper = require('./bookmarks-search.helper');
44

@@ -45,7 +45,7 @@ let getSnippetsForTagsAndTerms = async function (searchedTags, nonSpecialSearchT
4545

4646
addSpecialSearchFiltersToMongoFilter(specialSearchFilters, filter);
4747

48-
let snippets = await Codelet.find(
48+
let snippets = await Snippet.find(
4949
filter,
5050
{
5151
score: {$meta: "textScore"}
@@ -80,7 +80,7 @@ let getSnippetsForSearchedTerms = async function (userId, nonSpecialSearchTerms,
8080

8181
addSpecialSearchFiltersToMongoFilter(specialSearchFilters, filter);
8282

83-
let snippets = await Codelet.find(
83+
let snippets = await Snippet.find(
8484
filter,
8585
{
8686
score: {$meta: "textScore"}
@@ -111,7 +111,7 @@ let getSnippetsForSearchedTags = async function (userId, searchedTags, page, lim
111111

112112
addSpecialSearchFiltersToMongoFilter(specialSearchFilters, filter);
113113

114-
let snippets = await Codelet.find(filter)
114+
let snippets = await Snippet.find(filter)
115115
.sort({createdAt: -1})
116116
.skip((page - 1) * limit)
117117
.limit(limit)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const CodeSnippetSchema = new Schema({
1111
comment: String,
1212
});
1313

14-
const codeletSchema = new Schema({
14+
const snippetSchema = new Schema({
1515
title: {type:String, required: true},
1616
codeSnippets: [CodeSnippetSchema],
1717
tags: [String],
@@ -30,5 +30,5 @@ const codeletSchema = new Schema({
3030
timestamps: true
3131
});
3232

33-
module.exports = mongoose.model('Codelet', codeletSchema);
33+
module.exports = mongoose.model('Snippet', snippetSchema);
3434

backend/src/routes/public/public-snippets.service.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const Codelet = require('../../model/codelet');
1+
const Snippet = require('../../model/snippet');
22
const NotFoundError = require('../../error/not-found.error');
33

44
let getSnippetById = async function (snippetId) {
5-
const snippet = await Codelet.findOne({
5+
const snippet = await Snippet.findOne({
66
public: true,
77
_id: snippetId
88
});
@@ -15,7 +15,7 @@ let getSnippetById = async function (snippetId) {
1515

1616
let getLatestPublicSnippets = async (page, limit) => {
1717

18-
const bookmarks = await Codelet.find({'public': true})
18+
const bookmarks = await Snippet.find({'public': true})
1919
.sort({createdAt: -1})
2020
.skip((page - 1) * limit)
2121
.limit(limit)
@@ -36,7 +36,7 @@ let getPublicSnippetsForTag = async (tag, orderBy, page, limit) => {
3636
default:
3737
orderByFilter = {createdAt: -1}
3838
}
39-
const snippets = await Codelet.find({
39+
const snippets = await Snippet.find({
4040
public: true,
4141
tags: tag
4242
})

backend/src/routes/users/codelets/personal-codelets.service.js

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

0 commit comments

Comments
 (0)