You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _includes/docs/docs.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@
12
12
<h1id="overview"class="page-header">Overview</h1>
13
13
14
14
<blockquote>
15
-
CodeRoad aims to make building & sharing interactive tutorials as easy as possible.
15
+
CodeRoad aims to make building & sharing interactivecodingtutorials as easy as possible.
16
16
</blockquote>
17
17
18
-
<divclass="lead">We hope to create fun and maintainablecoding tutorials that actually improve with time. We hope to see students become teachers, teachers become empowered, and coders become better, faster. But first, let's get some interactive tutorials built.
19
-
That's where you come in.</div>
18
+
<divclass="lead">We hope to create fun and maintainablecode tutorials that actually improve with time. We hope to seeprogrammingstudents become teachers, teachers become empowered, and coders become better, faster. But first, let's get some interactive coding tutorials built.
19
+
That's where you come in.</div>
20
20
21
21
<ahref="/build"class="btn btn-default btn-lg"><iclass="fa fa-road fa-fw"></i><spanclass="network-name">Read an Overview of Building a Tutorial</span></a>
Copy file name to clipboardExpand all lines: _posts/2016-01-04-coderoad-api.md
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -62,11 +62,10 @@ See an [example](https://github.com/coderoad/coderoad-functional-school/blob/mas
62
62
63
63
###`@hint`
64
64
65
-
*@hint* loads a string(or array of strings)which can be used to provide hints for the user. The order of hints is important: first in, first out.
65
+
*@hint* loads a string which can be used to provide hints for the user. The order of hints is important: first in, first out.
66
66
67
67
```markdown
68
68
@hint('A hint for the user')
69
-
@hint(['Hint 1', 'Hint 2'])
70
69
71
70
*@hint* may use code-blocks with syntax highlighting, but they must be wrapped in quotes.
72
71
@@ -121,4 +120,4 @@ Add text to the bottom of the active text editor.
121
120
122
121
####What's Next
123
122
124
-
More editor actions will be added to CodeRoad at a later date.
123
+
More editor actions will be added to CodeRoad at a later date. These may include changing the cursor position, replacing content, decorating keywords, etc.
Copy file name to clipboardExpand all lines: _posts/2016-01-06-loaders.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ id: loaders-snippets
5
5
file:2016-01-06-loaders.md
6
6
---
7
7
8
-
Tutorials may be written in different programming languages or for different compilers, so there isn't yet a standard way to load data from user created files. Instead, you'll have to load yourown solution into your tutorial and link to them from yourtestfile. Rolling your own solution allows you to load data in a way that fits your project.
8
+
Tutorials may be written in different programming languages or for different compilers, so there isn't yet a standard way to load data from user created files. Instead, you'll have to load/transpile yourfiles for thetestrunner. Rolling your own solution allows you to load data in a way that fits your project.
9
9
10
-
These snippets should help:
10
+
There may be a simpler approach in the future, but for now these snippets should help:
Copy file name to clipboardExpand all lines: _posts/2016-01-10-test-runner.md
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ title: Test Runners
4
4
id:test-runners
5
5
file:2016-01-10-test-runner.md
6
6
---
7
-
A test runner works by creating a child process and calling a test framework with target files.
7
+
ACodeRoadtest runner works by creating a child process and calling a test framework with target files, then returning the result as a JSON object.
8
8
9
9
In this way, the test runner not only determines how unit tests will be written, but it actually determines the programming language used in the tutorial.
10
10
11
-
>Any programming languagecould be used with CodeRoad, you need only change the test runner.
11
+
>Any programming languagecan potentially be used with CodeRoad, you need only change the test runner.
12
12
13
13
###Current Test Runners
14
14
@@ -18,13 +18,13 @@ We need more test runners. Why not build one?
18
18
19
19
###How to Build a New Test Runner
20
20
21
-
If you're interested in helping CodeRoad support a programming language of your choice, here's how to set up the test runner.
21
+
If you're interested in helping CodeRoad support adifferentprogramming language or test framework of your choice, here's how to set up the test runner.
22
22
23
-
The test runner should spawn a child process. Think of this like your program opening up a terminal, typing in command line commands, then collecting and returning the the results to*Atom-CodeRoad*. See[an example child process createdin*mocha-coderoad*](https://github.com/coderoad/mocha-coderoad/blob/master/src/create-runner.ts).
23
+
The test runner should spawn a child process. Think of this like your program opening up a terminal, typing insomecommand line commands to run tests, then collecting and returning the the results to*Atom-CodeRoad*. See[an example child process createdinside of Atom for*mocha-coderoad*](https://github.com/coderoad/mocha-coderoad/blob/master/src/create-runner.ts).
24
24
25
-
The test runner is called with four ordered inputs, two of which act as callback functions that return the log& result to*Atom-CodeRoad*.
25
+
The test runner is calledin*Atom-CodeRoad*with four ordered inputs, two of which act as callback functions that return the logor result.
26
26
27
-
See a brief example from the[*mocha-coderoad* runner](https://github.com/coderoad/mocha-coderoad/blob/master/src/runner.ts).
27
+
See a brief example from the[*mocha-coderoad* runner](https://github.com/coderoad/mocha-coderoad/blob/master/src/runner.ts), as well as a code summary below:
Let's look at these fourtest runnerinputs in more detail.
39
39
40
40
####1. testFile
41
41
42
-
The absolute path to a file containing all concatenated page tests. Call your test framework with this.
42
+
The absolute path to a file containing all concatenated page tests. Call your test framework with this file path.
43
43
44
44
####2. config
45
45
46
-
A JSON object of configurations, seean example below
46
+
A JSON object of configurations that may be needed for setting up your runner. Seean example below:
47
47
48
48
```json
49
49
{
@@ -56,7 +56,10 @@ A JSON object of configurations, see an example below
56
56
57
57
####3. handleResult
58
58
59
-
A callback function that should be called with the**result** object. Results should either pass if all pass, or fail if any test fails.
59
+
A callback function that should be called with the**result** object. Results should pass if all tests pass, or fail if even a single test fails.
60
+
61
+
The result should output the*taskPosition* after the test. The field*change* represents the difference between the starting 'taskPosition' and the resulting 'taskPosition'.
62
+
60
63
61
64
#####pass
62
65
@@ -69,8 +72,6 @@ A callback function that should be called with the **result** object. Results sh
69
72
}
70
73
```
71
74
72
-
The result should output the 'taskPosition' after the test. 'change' represents the difference between the starting 'taskPosition' and the resulting 'taskPosition'.
73
-
74
75
#####fail
75
76
76
77
```json
@@ -85,6 +86,6 @@ The result should output the 'taskPosition' after the test. 'change' represents
85
86
86
87
####4. handleLog
87
88
88
-
A callback function that shouldbe called with a string**log** statement
89
+
A callback function that shouldreturn the output**log** statement.
89
90
90
91
*If you need help setting up a new test runner, please send an email tocoderoadapp@gmail.com.*