Skip to content

Commit d6f3220

Browse files
authored
Merge branch 'master' into add_reactivity_menu
2 parents d32af70 + fc5c5aa commit d6f3220

File tree

7 files changed

+153
-55
lines changed

7 files changed

+153
-55
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
_model: page
2+
---
3+
_template: page-with-toc.html
4+
---
5+
title: JavaScript Guidelines
6+
---
7+
description:
8+
9+
These JavaScript Guidelines (style guide) help the community focus on the code's intent and work together with a minimum of friction.
10+
---
11+
body:
12+
13+
## Purpose
14+
15+
These JavaScript Guidelines help developers who are new to the community and want to contribute to the Creative Commons open-source ecosystem.
16+
17+
## Philosophy
18+
A few philosophical guidelines can stand in place of a thousand narrow rules. These guidelines are not intended as absolute (black or white) truths but rather lenses to focus our vision when faced with subtle shades of ambiguity.
19+
20+
### Simplicity
21+
22+
> Use and build only what is _essential_ to a project.
23+
24+
Projects can quickly grow beyond their essence by taking on dependencies and features that are not central to their purpose. Keep the essential goal in mind as a project evolves. Take on only what is needed and only when the need arises.
25+
26+
### Stability
27+
28+
> Build for longevity and maturity.
29+
30+
It is easy to get swept away in the rushing waters of new projects, tools, and libraries. However, the sedimentary landscape left behind by the swift and meandering river of change can be unstable. It is certainly unwise to build one's home on a river delta.
31+
32+
Choose an existing framework and set of tools and use them to make what matters to you. Avoiding creating a bespoke framework when a current framework would get you further down the road.
33+
34+
When choosing tools and technologies, keep an eye towards mature projects and standards built to last many years. Find projects that extend existing standards and ways of working.
35+
36+
### Focus
37+
38+
> Choose the right level of abstraction and best use of time.
39+
40+
When developing, it is easy to find ourselves in layers of technology that are not directly contributing to our goals. For example, spending inordinate time with build tool configurations or type definitions instead of building features and getting user feedback. Choose tools that get out of the way and transparently support your work, creating what matters.
41+
42+
### Maintainability
43+
44+
> Write clean and conventional code.
45+
46+
Code is read more often than it is written. Code is written for humans, not machines. As such, we can do ourselves a favor by making our code as reader-friendly as possible. Follow [clean code guidelines](https://github.com/ryanmcdermott/clean-code-javascript) as well as established development patterns.
47+
48+
## Pragmatics
49+
50+
The following sections outline how we've put the philosophy into action. See the [creativecommons/chooser](https://github.com/creativecommons/chooser) project to exemplify how we have applied the recommendations below.
51+
52+
### Code formatting
53+
54+
We adopt existing code formatting standards. To this end, all JavaScript code must be formatted using [Prettier][Prettier], *an opinionated code formatter*. We also use [eslint][eslint] to handle cases that Prettier may overlook.
55+
56+
[eslint]: https://eslint.org/
57+
[Prettier]: https://prettier.io/
58+
59+
### Development environment
60+
61+
We use `npm` to manage development dependencies. Each project should have a `package.json` with dependencies and scripts for running, linting, testing, and deploying the project (where possible).
62+
63+
### Development framework
64+
65+
We use [Vue.js][Vue] as our primary JavaScript development framework. Vue provides a ready-made toolkit that covers many development needs and extends on long-standing web development conventions.
66+
67+
[Vue]: https://vuejs.org/

databags/community_team_members.json

+38-23
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"name": "Zack Krida",
4545
"role": "Project Maintainer"
4646
},
47+
{
48+
"github": "Cronus1007",
49+
"name": "Ritish Thareja",
50+
"role": "Project Core Committer"
51+
},
4752
{
4853
"github": "hemanth-hk",
4954
"name": "Hemanth Kumar",
@@ -96,7 +101,7 @@
96101
"role": "Project Core Committer"
97102
},
98103
{
99-
"github": "luninor",
104+
"github": "ayanchoudhary",
100105
"name": "Ayan Choudhary",
101106
"role": "Project Collaborator"
102107
},
@@ -124,6 +129,32 @@
124129
"name": "Vocabulary",
125130
"repos": "vocabulary"
126131
},
132+
{
133+
"members": [
134+
{
135+
"github": "hugosolar",
136+
"name": "Hugo Solar",
137+
"role": "Project Maintainer"
138+
},
139+
{
140+
"github": "kgodey",
141+
"name": "Kriti Godey",
142+
"role": "Project Maintainer"
143+
},
144+
{
145+
"github": "ahmadbilaldev",
146+
"name": "Ahmad Bilal",
147+
"role": "Project Core Committer"
148+
},
149+
{
150+
"github": "Cronus1007",
151+
"name": "Ritish Thareja",
152+
"role": "Project Core Committer"
153+
}
154+
],
155+
"name": "WordPress Plugin",
156+
"repos": "wp-plugin-creativecommons"
157+
},
127158
{
128159
"members": [
129160
{
@@ -284,6 +315,11 @@
284315
"name": "Dhruvi Butti",
285316
"role": "Project Core Committer"
286317
},
318+
{
319+
"github": "Cronus1007",
320+
"name": "Ritish Thareja",
321+
"role": "Project Core Committer"
322+
},
287323
{
288324
"github": "makkoncept",
289325
"name": "Mayank Nader",
@@ -326,7 +362,7 @@
326362
"role": "Project Core Committer"
327363
},
328364
{
329-
"github": "luninor",
365+
"github": "ayanchoudhary",
330366
"name": "Ayan Choudhary",
331367
"role": "Project Core Committer"
332368
},
@@ -511,27 +547,6 @@
511547
],
512548
"name": "Platform Toolkit",
513549
"repos": "mp"
514-
},
515-
{
516-
"members": [
517-
{
518-
"github": "hugosolar",
519-
"name": "Hugo Solar",
520-
"role": "Project Maintainer"
521-
},
522-
{
523-
"github": "kgodey",
524-
"name": "Kriti Godey",
525-
"role": "Project Maintainer"
526-
},
527-
{
528-
"github": "ahmadbilaldev",
529-
"name": "Ahmad Bilal",
530-
"role": "Project Core Committer"
531-
}
532-
],
533-
"name": "WordPress Plugin",
534-
"repos": "wp-plugin-creativecommons"
535550
}
536551
]
537552
}

databags/repos.json

+30-16
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"HTML"
7373
],
7474
"url": "https://github.com/creativecommons/cc-licenses",
75-
"website": null
75+
"website": ""
7676
},
7777
{
7878
"created": "2020-09-08T19:18:51",
@@ -240,7 +240,7 @@
240240
"language": "Python",
241241
"license": {
242242
"name": "MIT License",
243-
"url": "https://github.com/creativecommons/cccatalog/blob/master/LICENSE"
243+
"url": "https://github.com/creativecommons/cccatalog/blob/main/LICENSE"
244244
},
245245
"name": "cccatalog",
246246
"slack": "cc-dev-catalog",
@@ -249,7 +249,7 @@
249249
"Apache Spark"
250250
],
251251
"url": "https://github.com/creativecommons/cccatalog",
252-
"website": ""
252+
"website": "https://github.com/WordPress/openverse-catalog"
253253
},
254254
{
255255
"created": "2018-04-27T20:50:37",
@@ -261,7 +261,7 @@
261261
"language": "Python",
262262
"license": {
263263
"name": "MIT License",
264-
"url": "https://github.com/creativecommons/cccatalog-api/blob/master/LICENSE"
264+
"url": "https://github.com/creativecommons/cccatalog-api/blob/main/LICENSE"
265265
},
266266
"name": "cccatalog-api",
267267
"slack": "",
@@ -272,7 +272,7 @@
272272
"Elasticsearch"
273273
],
274274
"url": "https://github.com/creativecommons/cccatalog-api",
275-
"website": "https://api.creativecommons.engineering/"
275+
"website": "https://github.com/WordPress/openverse-api"
276276
},
277277
{
278278
"created": "2018-04-27T21:32:44",
@@ -283,7 +283,7 @@
283283
"language": "HTML",
284284
"license": {
285285
"name": "MIT License",
286-
"url": "https://github.com/creativecommons/cccatalog-dataviz/blob/master/LICENSE"
286+
"url": "https://github.com/creativecommons/cccatalog-dataviz/blob/main/LICENSE"
287287
},
288288
"name": "cccatalog-dataviz",
289289
"slack": "cc-dev-cc-catalog-viz",
@@ -300,7 +300,7 @@
300300
"language": "Vue",
301301
"license": {
302302
"name": "MIT License",
303-
"url": "https://github.com/creativecommons/cccatalog-frontend/blob/develop/LICENSE"
303+
"url": "https://github.com/creativecommons/cccatalog-frontend/blob/main/LICENSE"
304304
},
305305
"name": "cccatalog-frontend",
306306
"slack": "cc-search",
@@ -309,7 +309,7 @@
309309
"Vue.js"
310310
],
311311
"url": "https://github.com/creativecommons/cccatalog-frontend",
312-
"website": "https://search.creativecommons.org"
312+
"website": "https://github.com/WordPress/openverse-frontend"
313313
},
314314
{
315315
"created": "2014-10-06T22:07:52",
@@ -388,7 +388,7 @@
388388
"language": "JavaScript",
389389
"license": {
390390
"name": "MIT License",
391-
"url": "https://github.com/creativecommons/ccsearch-browser-extension/blob/master/LICENSE"
391+
"url": "https://github.com/creativecommons/ccsearch-browser-extension/blob/main/LICENSE"
392392
},
393393
"name": "ccsearch-browser-extension",
394394
"slack": "cc-dev-browser-extension",
@@ -434,7 +434,7 @@
434434
"english_name": "CC Chooser",
435435
"featured": true,
436436
"id": 188122843,
437-
"language": "Vue",
437+
"language": "JavaScript",
438438
"license": {
439439
"name": "MIT License",
440440
"url": "https://github.com/creativecommons/chooser/blob/main/LICENSE"
@@ -483,7 +483,7 @@
483483
"language": "PHP",
484484
"license": {
485485
"name": "MIT License",
486-
"url": "https://github.com/creativecommons/creativecommons-base/blob/master/LICENSE"
486+
"url": "https://github.com/creativecommons/creativecommons-base/blob/main/LICENSE"
487487
},
488488
"name": "creativecommons-base",
489489
"slack": "cc-dev-wordpress",
@@ -492,7 +492,7 @@
492492
"WordPress"
493493
],
494494
"url": "https://github.com/creativecommons/creativecommons-base",
495-
"website": ""
495+
"website": "https://opensource.creativecommons.org/creativecommons-base/"
496496
},
497497
{
498498
"created": "2020-06-11T17:20:52",
@@ -602,7 +602,7 @@
602602
"language": "Python",
603603
"license": {
604604
"name": "MIT License",
605-
"url": "https://github.com/creativecommons/image-crawler/blob/master/LICENSE"
605+
"url": "https://github.com/creativecommons/image-crawler/blob/main/LICENSE"
606606
},
607607
"name": "image-crawler",
608608
"slack": "",
@@ -611,7 +611,7 @@
611611
"asyncio"
612612
],
613613
"url": "https://github.com/creativecommons/image-crawler",
614-
"website": null
614+
"website": ""
615615
},
616616
{
617617
"created": "2018-05-16T19:44:57",
@@ -814,6 +814,20 @@
814814
"url": "https://github.com/creativecommons/primary-site-includes",
815815
"website": ""
816816
},
817+
{
818+
"created": "2021-07-06T17:25:01",
819+
"description": "Project for creativecommons.org",
820+
"id": 383548251,
821+
"language": null,
822+
"license": {
823+
"name": "MIT License",
824+
"url": "https://github.com/creativecommons/project_creativecommons.org/blob/main/LICENSE"
825+
},
826+
"name": "project_creativecommons.org",
827+
"slack": "",
828+
"url": "https://github.com/creativecommons/project_creativecommons.org",
829+
"website": ""
830+
},
817831
{
818832
"created": "2013-12-02T20:59:52",
819833
"description": "",
@@ -1003,7 +1017,7 @@
10031017
"language": "JavaScript",
10041018
"license": {
10051019
"name": "MIT License",
1006-
"url": "https://github.com/creativecommons/vocabulary/blob/master/LICENSE"
1020+
"url": "https://github.com/creativecommons/vocabulary/blob/main/LICENSE"
10071021
},
10081022
"name": "vocabulary",
10091023
"slack": "cc-dev-vocabulary",
@@ -1169,7 +1183,7 @@
11691183
"language": "PHP",
11701184
"license": {
11711185
"name": "MIT License",
1172-
"url": "https://github.com/creativecommons/wp-theme-creativecommons.org/blob/master/LICENSE"
1186+
"url": "https://github.com/creativecommons/wp-theme-creativecommons.org/blob/main/LICENSE"
11731187
},
11741188
"name": "wp-theme-creativecommons.org",
11751189
"slack": "",

themes/vocabulary_theme/templates/layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
['/contributing-code/pr-guidelines', 'Pull Request Guidelines'],
8080
['/contributing-code/github-repo-guidelines', 'GitHub Repo Guidelines'],
8181
['/contributing-code/repo-labels', 'Repository Labels'],
82+
['/contributing-code/javascript-guidelines', 'JavaScript Guidelines'],
8283
['/contributing-code/python-guidelines', 'Python Guidelines'],
8384
['/contributing-code/translation-guide', 'Translation Guide'],
8485
['/contributing-code/usability', 'Usability'],

themes/vocabulary_theme/templates/page-with-toc.html

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ <h1>{{ this.title }}</h1>
3333
['/contributing-code/pr-guidelines', 'Pull Request Guidelines'],
3434
['/contributing-code/github-repo-guidelines', 'GitHub Repo Guidelines'],
3535
['/contributing-code/repo-labels', 'Repository Labels'],
36+
['/contributing-code/javascript-guidelines', 'JavaScript Guidelines'],
3637
['/contributing-code/python-guidelines', 'Python Guidelines'],
3738
['/contributing-code/translation-guide', 'Translation Guide'],
3839
] %}

0 commit comments

Comments
 (0)