Skip to content

Commit 1989099

Browse files
authored
Merge pull request #5586 from stampyzfanz/main
docs(contributing md): add language to code blocks
2 parents e469fe2 + 59199cf commit 1989099

17 files changed

+101
-101
lines changed

contributor_docs/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,28 @@ This process is also covered [in a video by The Coding Train.](https://youtu.be/
7676

7777
3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer.
7878

79-
```
79+
```shell
8080
$ git clone https://github.com/YOUR_USERNAME/p5.js.git
8181
```
8282

8383
4. Navigate into the project folder and install all its necessary dependencies with npm.
8484

85-
```
85+
```shell
8686
$ cd p5.js
8787
$ npm ci
8888
```
8989

9090
5. [Grunt](https://gruntjs.com/) should now be installed, and you can use it to build the library from the source code.
9191

92-
```
92+
```shell
9393
$ npm run grunt
9494
```
9595

9696
If you're continuously changing files in the library, you may want to run `npm run dev` to automatically rebuild the library for you whenever any of its source files change without you having to first type the command manually.
9797

9898
6. Make some changes locally to the codebase and [commit](https://help.github.com/articles/github-glossary/#commit) them with Git.
9999

100-
```
100+
```shell
101101
$ git add -u
102102
$ git commit -m "YOUR COMMIT MESSAGE"
103103
```
@@ -106,7 +106,7 @@ This process is also covered [in a video by The Coding Train.](https://youtu.be/
106106

107107
8. [Push](https://help.github.com/articles/github-glossary/#push) your new changes to your fork on GitHub.
108108

109-
```
109+
```shell
110110
$ git push
111111
```
112112

@@ -124,13 +124,13 @@ p5.js requires clean and stylistically consistent code syntax, which it enforces
124124

125125
To detect errors, run the following command in your terminal (do not type the `$` prompt):
126126

127-
```
127+
```shell
128128
$ npm run lint
129129
```
130130

131131
Some syntax errors can be automatically fixed:
132132

133-
```
133+
```shell
134134
$ npm run lint:fix
135135
```
136136

@@ -159,7 +159,7 @@ Unit tests are small pieces of code which are created as complements to the prim
159159

160160
In order to run unit tests, you'll need to make sure you have installed the project's dependencies.
161161

162-
```
162+
```shell
163163
$ npm ci
164164
```
165165

@@ -170,13 +170,13 @@ This will install *all* the dependencies for p5.js; briefly, the most important
170170

171171
Once the dependencies are installed, use Grunt to run the unit tests.
172172

173-
```
173+
```shell
174174
$ grunt
175175
```
176176

177177
Sometimes it is useful to run the tests in the browser instead of on the command line. To do this, first start the [connect](https://github.com/gruntjs/grunt-contrib-connect) server:
178178

179-
```
179+
```shell
180180
$ npm run dev
181181
```
182182

contributor_docs/hi/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,28 @@ p5.js में योगदान देने में आपकी रुच
6060
2. [फोर्क](https://help.github.com/articles/fork-a-repo) [p5.js रिपॉजिटरी](https://github.com/processing/p5.js) अपने खुद के गिटहब खाते में।
6161
3. [क्लोन](https://help.github.com/articles/cloning-a-repository/) आपके स्थानीय कंप्यूटर पर गिटहब से रिपॉजिटरी का नया फोर्क।
6262

63-
```
63+
```shell
6464
$ git clone https://github.com/YOUR_USERNAME/p5.js.git
6565
```
6666

6767
4. प्रोजेक्ट फ़ोल्डर में नेविगेट करें और npm के साथ अपनी सभी आवश्यक निर्भरताएं स्थापित करें।
6868

69-
```
69+
```shell
7070
$ cd p5.js
7171
$ npm ci
7272
```
7373

7474
5. [ग्रंट](https://gruntjs.com/) अब स्थापित किया जाना चाहिए, और आप इसका उपयोग स्रोत कोड से लाइब्रेरी बनाने के लिए कर सकते हैं।
7575

76-
```
76+
```shell
7777
$ npm run grunt
7878
```
7979

8080
यदि आप लाइब्रेरी में लगातार फाइलों को बदल रहे हैं, तो आप अपने लिए लाइब्रेरी को स्वचालित रूप से पुनर्निर्माण करने के लिए `npm run dev` को चलाना चाहते हैं, जब भी इसका कोई भी सोर्स आपके बिना पहली बार मैन्युअल रूप से टाइप किए बिना बदल जाता है।
8181

8282
6. स्थानीय रूप से कोडबेस और [कमिट](https://help.github.com/articles/github-glossary/#commit) में कुछ बदलाव करें।
8383

84-
```
84+
```shell
8585
$ git add -u
8686
$ git commit -m "YOUR COMMIT MESSAGE"
8787
```
@@ -90,7 +90,7 @@ p5.js में योगदान देने में आपकी रुच
9090

9191
8. [पुश](https://help.github.com/articles/github-glossary/#push) गिटहब पर आपके फोर्क में आपके नए परिवर्तन।
9292

93-
```
93+
```shell
9494
$ git push
9595
```
9696

@@ -108,13 +108,13 @@ p5.js को स्वच्छ और शैलीगत सुसंगत क
108108

109109
त्रुटियों का पता लगाने के लिए, अपने टर्मिनल में निम्न कमांड चलाएँ (`$` प्रांप्ट टाइप न करें):
110110

111-
```
111+
```shell
112112
$ npm run lint
113113
```
114114

115115
कुछ सिंटैक्स त्रुटियां स्वचालित रूप से ठीक की जा सकती हैं:
116116

117-
```
117+
```shell
118118
$ npm run lint:fix
119119
```
120120

@@ -136,7 +136,7 @@ $ npm run lint:fix
136136

137137
इकाई परीक्षण चलाने के लिए, आपको पहले परियोजना की निर्भरताएँ स्थापित करनी होंगी।
138138

139-
```
139+
```shell
140140
$ npm ci
141141
```
142142

@@ -147,13 +147,13 @@ $ npm ci
147147

148148
एक बार निर्भरताएं स्थापित हो जाने के बाद, यूनिट परीक्षणों को चलाने के लिए ग्रंट का उपयोग करें।
149149

150-
```
150+
```shell
151151
$ grunt
152152
```
153153

154154
कभी-कभी कमांड लाइन पर के बजाय ब्राउज़र में परीक्षण चलाना उपयोगी होता है। ऐसा करने के लिए, पहले [कनेक्ट](https://github.com/gruntjs/grunt-contrib-connect) सर्वर शुरू करें:
155155

156-
```
156+
```shell
157157
$ npm run dev
158158
```
159159

contributor_docs/hi/preparing_a_pull_request.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
### परिवर्तनों के बारे में जानें
1313
सुनिश्चित करें कि आप अपस्ट्रीम p5.js रिपॉजिटरी को ट्रैक कर रहे हैं।
1414

15-
git remote show upstream
15+
$ git remote show upstream
1616

1717
यदि आपको कोई त्रुटि दिखाई देती है, तो आपको "upstream" रिमोट रिपॉजिटरी के रूप में मुख्य p5.js रेपो को ट्रैक करना शुरू करना होगा। आपको केवल एक बार ऐसा करने की आवश्यकता होगी! लेकिन, अगर आप इसे दूसरी बार चलाते हैं तो कोई नुकसान नहीं होता है।
1818

19-
git remote add upstream https://github.com/processing/p5.js
19+
$ git remote add upstream https://github.com/processing/p5.js
2020

2121
फिर नवीनतम परिवर्तनों के बारे में पूछें।
2222

23-
git fetch upstream
23+
$ git fetch upstream
2424

2525
### शायद ज़रुरत पड़े- एक नई शाखा में अपने परिवर्तनों की एक प्रति बनाएँ
26-
git branch your-branch-name-backup
26+
$ git branch your-branch-name-backup
2727

2828
### मुख्य शाखा से परिवर्तन लागू करता है, *बाद में* अपने परिवर्तन जोड़ता है
29-
git rebase upstream/main
29+
$ git rebase upstream/main
3030

3131
### विवादों का समाधान
3232
आपकी शाखा में कुछ उलझनें हो सकती हैं!
@@ -39,7 +39,7 @@
3939
यदि आपके पास अन्य फ़ाइलों में विरोध है और आप सुनिश्चित नहीं हैं कि उन्हें कैसे हल किया जाए ... मदद के लिए पूछें!
4040

4141
### और अंत में, महान गौरव के लिए
42-
git push origin
42+
$ git push origin
4343

4444
यदि आप तकनीकी विवरणों के बारे में गहन जानकारी प्राप्त कर रहे हैं, तो रेबेसिंग पर एक अच्छा संदर्भ है। https://www.atlassian.com/git/tutorials/merging-vs-rebasing
4545

contributor_docs/hi/unit_testing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
### सभी यूनिट टेस्ट को चलाना
1111
रेपो रूट में, अपने टर्मिनल में निम्न कमांड का उपयोग करें
12-
```
13-
npm test
12+
```shell
13+
$ npm test
1414
```
1515

1616
### परीक्षण कवरेज
@@ -25,7 +25,7 @@ npm test
2525
### एक उदाहरण
2626

2727
केवल "p5.ColorConversion" परीक्षणों का सूट चलाने के लिए, आप पढ़ने के लिए ```test/unit/color/color_conversion.js``` की पहली पंक्ति को बदल देंगे-
28-
```
28+
```js
2929
suite.only('color/p5.ColorConversion', function() {
3030
```
3131
@@ -80,7 +80,7 @@ Node.js परीक्षणों के लिए सेटअप सभी `
8080

8181
हम ```p5.prototype.isKeyPressed``` के लिए एक परीक्षण सूट बना सकते हैं और इसके लिए परीक्षण बनाना शुरू कर सकते हैं। हम अपने यूनिट परीक्षणों की संरचना के लिए Mocha का उपयोग करेंगे।
8282

83-
```
83+
```js
8484
suite('p5.prototype.keyIsPressed', function() {
8585
test('keyIsPressed is a boolean', function() {
8686
//परीक्षण यहाँ लिखें
@@ -98,7 +98,7 @@ suite('p5.prototype.keyIsPressed', function() {
9898
9999
हमने परीक्षणों की संरचना की है, लेकिन हमने अभी तक परीक्षण नहीं लिखे हैं। हम इसके लिए ची के दावे का उपयोग करेंगे। निम्नलिखित को धयान मे रखते हुए-
100100
101-
```
101+
```js
102102
test('keyIsPressed is a boolean', function() {
103103
assert.isBoolean(myp5.keyIsPressed); //दावा करता है कि मूल्य एक बूलियन है।
104104
});

contributor_docs/inline_documentation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You must specify one of these for the element to appear in the docs, with the na
1616
* When possible, link to other files when mentioning other function or variable names. For example, you can see the preload method linked in the description for [loadImage](https://github.com/processing/p5.js/blob/main/src/image/loading_displaying.js#L21).
1717
* Here is [yuidoc's reference](http://yui.github.io/yuidoc/syntax/index.html#basic-requirements) for more syntax information.
1818

19-
```
19+
```js
2020
/**
2121
* The x component of the vector
2222
* @property x
@@ -25,7 +25,7 @@ You must specify one of these for the element to appear in the docs, with the na
2525
this.x = x || 0;
2626
```
2727

28-
```
28+
```js
2929

3030
/**
3131
* Draw an arc
@@ -45,7 +45,7 @@ You must specify one of these for the element to appear in the docs, with the na
4545
*/
4646
```
4747

48-
```
48+
```js
4949
/**
5050
*
5151
* Calculates the magnitude (length) of the vector and returns the result
@@ -98,7 +98,7 @@ If the method returns the parent object, you can skip the `@return` and add this
9898

9999
If a method has multiple possible parameter options, you can specify each individually. For example, see the examples for [background](http://p5js.org/reference/#p5/background) under "syntax". To do this, choose one version to list as the first signature using the guidelines above. At the end of the documentation block, you can add additional signatures, each in its own block, following the example below.
100100

101-
```
101+
```js
102102
/**
103103
* @method background
104104
* @param {String} colorstring color string, possible formats include: integer
@@ -123,7 +123,7 @@ Notes:
123123

124124
Use `@final` if a property or variable is a constant:
125125

126-
```
126+
```js
127127
/**
128128
* PI is a mathematical constant with the value 3.14159265358979323846.
129129
* @property PI
@@ -135,7 +135,7 @@ Use `@final` if a property or variable is a constant:
135135

136136
Use `@private` if a property or variable is a private variable (default is `@public` so no need to specify).
137137

138-
```
138+
```js
139139
/**
140140
* _start calls preload() setup() and draw()
141141
*
@@ -149,7 +149,7 @@ Use `@private` if a property or variable is a private variable (default is `@pub
149149
150150
The top of each *file* should contain a `@module` tag. Modules should correspond to JavaScript files (or require.js modules). They can work as groups in the lists of items. See [here](https://p5js.org/reference/#collection-list-nav) (the modules are COLOR, IMAGE, IO, PVECTOR, etc.).
151151
152-
```
152+
```js
153153
/**
154154
* @module image
155155
*/
@@ -163,7 +163,7 @@ define(function (require) {
163163
164164
Constructors are defined with `@class`. Each constructor should have the tag `@class` followed by the name of the class, as well as the tag `@constructor`, and any `@param` tags required.
165165

166-
```
166+
```js
167167
/**
168168
* The p5 constructor function.
169169
* @class p5

contributor_docs/ko/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,28 @@ p5.js 프로젝트의 핵심적인 저장소들은 아래와 같습니다:
7575

7676
3. 포크 된 깃허브 저장소를 로컬 컴퓨터에 [클론](https://help.github.com/articles/cloning-a-repository/) 하십시오.
7777

78-
```
78+
```shell
7979
$ git clone https://github.com/YOUR_USERNAME/p5.js.git
8080
```
8181

8282
4. 프로젝트 폴더로 들어가 npm에 필요한 모든 디펜던시를 설치하십시오.
8383

84-
```
84+
```shell
8585
$ cd p5.js
8686
$ npm ci
8787
```
8888

8989
5. 이제 [Grunt](https://gruntjs.com/)가 설치되었을텐데, 소스 코드로부터 라이브러리를 빌드하기 위해 이를 이용할 수 있습니다.
9090

91-
```
91+
```shell
9292
$ npm run grunt
9393
```
9494

9595
만약 라이브러리의 파일을 계속해서 변경해야 한다면, 사전에 수동으로 일일이 명령어를 입력하지 않아도 소스 파일 변경 사항을 자동적으로 다시 빌드해줄 수 있도록 `npm run dev`를 실행 하는 게 나을 것입니다.
9696

9797
6. 로컬에서 코드 베이스를 변경하고, 깃(Git)으로 [커밋](https://help.github.com/articles/github-glossary/#commit) 하십시오.
9898

99-
```
99+
```shell
100100
$ git add -u
101101
$ git commit -m "YOUR COMMIT MESSAGE"
102102
```
@@ -105,7 +105,7 @@ p5.js 프로젝트의 핵심적인 저장소들은 아래와 같습니다:
105105

106106
8. 변경 사항을 여러분의 깃허브 포크에 [푸시](https://help.github.com/articles/github-glossary/#push) 하십시오.
107107

108-
```
108+
```shell
109109
$ git push
110110
```
111111

@@ -123,13 +123,13 @@ p5.js는 깔끔하고 일관성 있는 스타일의 코드 문법을 요구하
123123

124124
에러를 포착하기 위해서는 터미널에서 다음 명령어를 실행하세요(`$` 프롬프트는 입력하지 마십시오):
125125

126-
```
126+
```shell
127127
$ npm run lint
128128
```
129129

130130
어떤 문법 오류는 자동적으로 고쳐질 수도 있습니다:
131131

132-
```
132+
```shell
133133
$ npm run lint:fix
134134
```
135135

@@ -158,7 +158,7 @@ $ npm run lint:fix
158158

159159
유닛 테스트를 돌리기 위해서는 프로젝트의 디펜던시들을 반드시 설치해야 합니다.
160160

161-
```
161+
```shell
162162
$ npm ci
163163
```
164164

@@ -169,13 +169,13 @@ $ npm ci
169169

170170
디펜던시들이 설치되면, Grunt를 이용해 유닛 테스트를 돌리십시오.
171171

172-
```
172+
```shell
173173
$ grunt
174174
```
175175

176176
때론 커맨드 라인 대신 브라우저에서 테스트를 돌리는 것도 유용합니다. 이를 위해선, 먼저 서버 [연결](https://github.com/gruntjs/grunt-contrib-connect)을 시작하십시오:
177177

178-
```
178+
```shell
179179
$ npm run dev
180180
```
181181

0 commit comments

Comments
 (0)