Skip to content

Commit 1b3cad5

Browse files
committed
Merge pull request #25 from pradyun/base
Reorganize Repository (base)
2 parents 4e95e8e + 3f951a8 commit 1b3cad5

3 files changed

Lines changed: 33 additions & 20 deletions

File tree

PORTING.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
# Porting `JSON-minify`
1+
# Porting JSON-minify
22

33
Thanks for agreeing to help port this utility to another language!
44

5-
Please keep the following processes in mind:
5+
Please keep the following things in mind:
66

7-
1. A language port should maintain the same semantics as the main JS utility, which is that it should remove all whitespace and all JS-style comments (single-line and multiline), and nothing more. **Please do not diverge from these semantics** unless you've first discussed it and the maintainer(s) have agreed. Any substantial feature deviation should be ported to all other languages in this repo.
8-
2. File an issue on the repo discussing what language you want to port to, and any design issues which may apply to that specific language (the language doesn't have arrays, etc.).
9-
3. Once a language port is decided and planned, the maintainer(s) will create a main repo branch for the new language port, which will be a forked branch off the empty "base" branch as its starting point. An issues tag will also be created for the language.
10-
4. A language port must start from this empty language branch. A language branch should be fully self-contained (including all tests, documentation, etc.). Files/folders in the language branch should be named and organized in a common idiomatic way for the language in question, including consistent use of language styles (whitespace, comments, etc.). See other language branches for inspiration.
11-
5. A workable implementation must at least pass all the tests as listed in [TESTING.md](TESTING.md).
12-
6. Once a workable implementation for the language port is in place (including tests, documentation, etc.), submit a PR from your language branch to the main repo language branch (**not master!**), and we'll go from there!
13-
7. To be accepted to the main repo, the port (code and documentation) must be licensed with MIT (see the JS and PHP branches), though you are free to retain your own copyright message.
7+
1. A language port should maintain the same semantics as the main JS utility, which is that it should remove all whitespace and all JS-style comments (single-line and multiline), and nothing more. **Please do not diverge from these semantics** unless you've first discussed it and the maintainer(s) has (have) agreed. Any substantial feature deviation should be ported to all other languages in this repo.
8+
9+
2. File an issue on the repo discussing what language you want to port to, and any design issues which may apply to that specific language (the language doesn't have arrays, etc.).
10+
11+
3. Once a language port is decided and planned, the maintainer(s) will create a main repo branch for the new language port, which will be a forked branch off the empty "base" branch as its starting point. An issues tag will also be created for the language.
12+
13+
4. A language port must start from this empty language branch. A language branch should be fully self-contained (including all tests, documentation, etc.). Files/folders in the language branch should be named and organized in a common idiomatic way for the language in question, including consistent use of language styles (whitespace, comments, etc.). See other language branches for inspiration.
14+
15+
5. A workable implementation must at least pass all the tests as listed in [TESTING.md](TESTING.md).
16+
17+
6. Once a workable implementation for the language port is in place (including tests, documentation, etc.), submit a PR from your language branch to the main repo language branch (**not master!**), and we'll go from there!
18+
19+
7. To be accepted to the main repo, the port (code and documentation) must be licensed with the liberal MIT license (see the JS and PHP branches), though you are free to retain your own copyright message.
1420

1521
Thanks, again!

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `JSON-minify`
1+
# JSON-minify
22

3-
A port of the `JSON-minify` utility to the *** language.
3+
A port of the `JSON-minify` utility to the [target-language-name] language.
44

55
## Overview
66

TESTING.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Test JSON #1:
1+
# Tests for JSON.minify
2+
3+
#### Test 1
24

35
```js
46
// this is a JSON file with comments
@@ -19,13 +21,15 @@ Test JSON #1:
1921
*/
2022
```
2123

22-
Minified Result #1:
24+
Expected Result:
2325

2426
```js
2527
{"foo":"bar","bar":["baz","bum","zam"],"something":10,"else":20}
2628
```
2729

28-
Test JSON #2:
30+
-----
31+
32+
#### Test 2
2933

3034
```js
3135

@@ -34,13 +38,14 @@ Test JSON #2:
3438

3539
```
3640

37-
Minified Result #2:
38-
41+
Expected Result:
3942
```js
4043
{"/*":"*/","//":"","/*/":"//"}
4144
```
4245

43-
Test JSON #3:
46+
-----
47+
48+
#### Test 3
4449

4550
```js
4651
/*
@@ -56,21 +61,23 @@ something else */"blah"
5661
}
5762
```
5863

59-
Minified Result #3:
64+
Expected Result
6065

6166
```js
6267
{"foo":"bar/*","b\"az":"blah"}
6368
```
6469

65-
Test JSON #4:
70+
-----
71+
72+
#### Test 4
6673

6774
```js
6875
{"foo": "ba\"r//", "bar\\": "b\\\"a/*z",
6976
"baz\\\\": /* yay */ "fo\\\\\"*/o"
7077
}
7178
```
7279

73-
Minified Result #4:
80+
Expected Result
7481

7582
```js
7683
{"foo":"ba\"r//","bar\\":"b\\\"a/*z","baz\\\\":"fo\\\\\"*/o"}

0 commit comments

Comments
 (0)