File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
building/tooling/representers Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ All interactions with the Exercism website are handled automatically. Represente
10
10
- A path to a directory containing the submitted file(s) (with a trailing slash).
11
11
- A path to an output directory (with a trailing slash). This directory is writable.
12
12
- The script must write a ` representation.txt ` file to the output directory.
13
+ - The script must write a ` representation.json ` file to the output directory.
13
14
- The script must write a ` mapping.json ` file to the output directory.
14
15
15
16
## Output format
16
17
18
+ ### representation.txt
19
+
17
20
The ` representation.txt ` file contains some sort of canonical representation. This representation can take many forms, but is usually an AST:
18
21
19
22
``` ruby
@@ -50,6 +53,8 @@ class PLACEHOLDER_1
50
53
end
51
54
```
52
55
56
+ ### mapping.json
57
+
53
58
The ` mapping.json ` file maps placeholders to their original values:
54
59
55
60
``` json
@@ -62,3 +67,15 @@ The `mapping.json` file maps placeholders to their original values:
62
67
```
63
68
64
69
It is important to note that all identical names must be replaced with the same placeholder, irrespective of scope.
70
+
71
+ ### representation.json
72
+
73
+ The ` representation.json ` file contains metadata:
74
+
75
+ - ` version ` : the version number of the representer (defaults to ` 1 ` )
76
+
77
+ Example:
78
+
79
+ ``` json
80
+ { "version" : 2 }
81
+ ```
You can’t perform that action at this time.
0 commit comments