From 5ba38fa09b405fa9de33364e0c0f724761aba2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Thu, 11 Jan 2018 18:01:21 +0100 Subject: [PATCH 1/7] contribution image --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e72470622..97e0febee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -## Contributing +![contribution guidelines](https://i.imgur.com/NddZff4.png) **30 seconds of code** is a community effort, so feel free to contribute in any way you can. Every contribution helps! @@ -6,7 +6,7 @@ Here's what you can do to help: - [Open issues](https://github.com/Chalarangelo/30-seconds-of-code/issues/new) for things you want to see added or modified. - Be part of the discussion by helping out with [existing issues](https://github.com/Chalarangelo/30-seconds-of-code/issues) or talking on our [gitter channel](https://gitter.im/30-seconds-of-code/Lobby). -- Submit [pull requests](https://github.com/Chalarangelo/30-seconds-of-code/pulls) with snippets you have created (see below for guidelines). +- Submit [pull requests](https://github.com/Chalarangelo/30-seconds-of-code/pulls) with snippets and tests that you have created (see below for guidelines). - Tag uncategorized snippets by running `npm run tagger` and adding the appropriate tags next to the script name in `tag_database`. - Fix typos in existing snippets, improve snippet descriptions and explanations or provide better examples. From 3fc690f0faa7749fc0bcfbc6ecfda17ea9d0ebed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 12 Jan 2018 11:45:00 +0100 Subject: [PATCH 2/7] update contribution guidelines image --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 97e0febee..db590419d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -![contribution guidelines](https://i.imgur.com/NddZff4.png) +![contribution guidelines](https://i.imgur.com/8Wk9nat.png) **30 seconds of code** is a community effort, so feel free to contribute in any way you can. Every contribution helps! From acc159f3dc5a00327365995c2566bf23e1fdc698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 12 Jan 2018 11:52:27 +0100 Subject: [PATCH 3/7] fix docs, reorder ul --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db590419d..add49567e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,11 +4,12 @@ Here's what you can do to help: +- Submit [pull requests](https://github.com/Chalarangelo/30-seconds-of-code/pulls) with snippets and tests that you have created (see below for guidelines). - [Open issues](https://github.com/Chalarangelo/30-seconds-of-code/issues/new) for things you want to see added or modified. - Be part of the discussion by helping out with [existing issues](https://github.com/Chalarangelo/30-seconds-of-code/issues) or talking on our [gitter channel](https://gitter.im/30-seconds-of-code/Lobby). -- Submit [pull requests](https://github.com/Chalarangelo/30-seconds-of-code/pulls) with snippets and tests that you have created (see below for guidelines). - Tag uncategorized snippets by running `npm run tagger` and adding the appropriate tags next to the script name in `tag_database`. - Fix typos in existing snippets, improve snippet descriptions and explanations or provide better examples. +- Write tests for existing snippets (see below for guidelines). ### Snippet submission and Pull request guidelines From 031eea2bbab766ec7357a043e9cef8d54d0481d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 12 Jan 2018 12:03:45 +0100 Subject: [PATCH 4/7] add writing tests to docs --- CONTRIBUTING.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index add49567e..0fbf0698b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,8 +13,7 @@ Here's what you can do to help: ### Snippet submission and Pull request guidelines -- **DO NOT MODIFY THE README.md FILE!** Make changes to individual snippet files. **Travis CI** will automatically build the `README.md` file when your pull request is merged. -- **DO NOT MODIFY THE index.html FILE!** Make changes to individual snippet files. **Travis CI** will automatically build the `index.html` file when your pull request is merged. +- **DO NOT MODIFY THE README.md or index.html FILES!** Make changes to individual snippet files. **Travis CI** will automatically build the `README.md` and `index.html` files when your pull request is merged. - **Snippet filenames** must correspond to the title of the snippet. For example, if your snippet is titled `### awesomeSnippet` the filename should be `awesomeSnippet.md`. - Use `camelCase`, not `kebab-case` or `snake_case`. - Avoid capitalization of words, except if the whole word is capitalized (e.g. `URL` should be capitalized in the filename and the snippet title). @@ -39,6 +38,12 @@ Here's what you can do to help: - You can start creating a new snippet, by using the [snippet template](snippet-template.md) to format your snippets. - Updating the index.html or README.md files should only be done by altering the scripts in the **scripts** folder or altering their relative static parts in the **static-parts** folder. +### Writing tests +- Before writing any tests run `npm run tdd` script. It will update all tests inside the test directory. +- **DO NOT MODIFY THE snippetName.js files** under test directory. +- We are using [tape](https://github.com/substack/tape) for testing. + + ### Additional guidelines and conventions regarding snippets - When describing snippets, refer to methods, using their full name. For example, use `Array.reduce()`, instead of `reduce()`. From b425d5dd9b346faea63c619a3598a2c77c987d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 12 Jan 2018 12:12:57 +0100 Subject: [PATCH 5/7] update docs onde again --- CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0fbf0698b..94c8d1934 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,9 +39,12 @@ Here's what you can do to help: - Updating the index.html or README.md files should only be done by altering the scripts in the **scripts** folder or altering their relative static parts in the **static-parts** folder. ### Writing tests -- Before writing any tests run `npm run tdd` script. It will update all tests inside the test directory. +- Before writing any tests run `npm run tdd` script. It will update test directory to include new snippets as well as update old ones if needed. - **DO NOT MODIFY THE snippetName.js files** under test directory. - We are using [tape](https://github.com/substack/tape) for testing. +- Write tests under `snippetName.test.js` file. If you have trouble doing so, check out tests of other snippets. +- Be sure to run `npm run test`. It is going to run all tests for all snippets. - Make a new pull request **only if all the tests are passing**. + ### Additional guidelines and conventions regarding snippets From a087d9b5e7b80c6bdb9d05417b6373b2f8883f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 12 Jan 2018 12:13:35 +0100 Subject: [PATCH 6/7] remove part of docs We don't really this line anymore. We don't want anyone to modify those 2 files. --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94c8d1934..1b9f38e15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,6 @@ Here's what you can do to help: - Snippets *should* be abstract enough to be applied to different scenarios. - It is not mandatory but highly appreciated if you provide **test cases** and/or performance tests (we recommend using [jsPerf](https://jsperf.com/)). - You can start creating a new snippet, by using the [snippet template](snippet-template.md) to format your snippets. -- Updating the index.html or README.md files should only be done by altering the scripts in the **scripts** folder or altering their relative static parts in the **static-parts** folder. ### Writing tests - Before writing any tests run `npm run tdd` script. It will update test directory to include new snippets as well as update old ones if needed. From 505300f988d0e8885d75a6e992f265fe8caf1be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 12 Jan 2018 12:15:22 +0100 Subject: [PATCH 7/7] fix typo in docs --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b9f38e15..fc5760ff8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,8 @@ Here's what you can do to help: - **DO NOT MODIFY THE snippetName.js files** under test directory. - We are using [tape](https://github.com/substack/tape) for testing. - Write tests under `snippetName.test.js` file. If you have trouble doing so, check out tests of other snippets. -- Be sure to run `npm run test`. It is going to run all tests for all snippets. - Make a new pull request **only if all the tests are passing**. +- Be sure to run `npm run test`. It is going to run all tests for all snippets. +- Make a new pull request **only if all the tests are passing**.