Skip to content

Commit 6587c24

Browse files
committed
docs started
1 parent ecd3a14 commit 6587c24

9 files changed

+116
-96
lines changed

_includes/docs/docs.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ <h1 id="overview" class="page-header">Overview</h1>
1212
<blockquote>
1313
Docs are under construction
1414
</blockquote>
15-
15+
<br>
1616
{% for post in site.posts reversed %}
1717

18-
<!-- <section id="{{ post.id }}">
18+
<section id="{{ post.id }}">
1919
<h2 class="section-heading">{{ post.title }}</h2>
2020
<div class="lead">{{ post.content }}</div>
21-
</section> -->
22-
21+
</section>
22+
<br>
2323
{% endfor %}
2424
</section>
2525
</div>

_posts/2016-01-01-development.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

_posts/2016-01-01-installation.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: docs
3+
title: Installation
4+
id: install
5+
---
6+
7+
To build a tutorial with CodeRoad, you'll need to install two parts.
8+
9+
### Atom CodeRoad
10+
11+
Use [Atom CodeRoad](https://github.com/coderoad/atom-coderoad) to view and play your tutorial
12+
13+
* Download the [Atom](https://atom.io/) editor
14+
15+
* Install the *Atom-CodeRoad* package, or use the [apm](https://github.com/atom/apm) command-line tool
16+
17+
> apm install atom-coderoad
18+
19+
* Open *Atom-CodeRoad* in *Atom* using the "packages" menu or press *ctrl-alt-1*.
20+
21+
22+
### CodeRoad-CLI
23+
24+
Use [CodeRoad CLI](https://github.com/coderoad/coderoad-cli) to setup and build a project data file.
25+
26+
* Install *CodeRoad-CLI*. Make sure [NodeJS](nodejs.org) is already installed
27+
28+
> npm install -g coderoad-cli

_posts/2016-01-02-development.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
layout: docs
3+
title: Development
4+
id: development
5+
---
6+
7+
### Create
8+
9+
To get setup quickly with CodeRoad, either clone a tutorial repo or use the CLI.
10+
11+
In your development directory, run **create** with your new package name.
12+
13+
> coderoad create $YOUR-PACKAGE-NAME$
14+
15+
Running **create** generates:
16+
17+
1. an example `tutorial.md`, which imports several tutorial files
18+
2. an example `test` directory with a few example tests
19+
3. a `package.json` configuration with some of the following settings:
20+
21+
22+
{
23+
"name": "coderoad-$TUTORIAL-NAME$",
24+
"version": "0.1.0",
25+
"description": "Coderoad tutorial",
26+
"author": "Name <email> (site)",
27+
"main": "coderoad.json",
28+
"keywords": ["coderoad", "tutorial"],
29+
"dependencies": {
30+
"mocha-coderoad": "^0.3.1"
31+
},
32+
"coderoad": {
33+
"testDir": "test",
34+
"testSuffix": ".spec.js",
35+
"testRunner": "mocha-coderoad"
36+
}
37+
38+
We'll learn more about these configurations later.
39+
40+
Update changes to your tutorial by running **build**. This will generate a *coderoad.json* data file used by *atom-coderoad*.
41+
42+
> coderoad build
43+
44+
### Demo Your Tutorial
45+
46+
Open a new directory for demoing your tutorial. Setup a new NPM project file.
47+
48+
> npm init
49+
50+
Add your package name to the `dependencies` in `package.json`:
51+
52+
"dependencies": {
53+
"coderoad-$YOUR-PACKAGE-NAME$": "^0.1.0"
54+
}
55+
56+
Normally you would use `npm install` to install the package, but your package isn't ready to be published yet. Instead, you need to link your tutorial package to your demo directory.
57+
58+
### Link Your Demo & Tutorial
59+
60+
[NPM link](https://docs.npmjs.com/cli/link) creates a symbolic link between directories. This allows your demo directory to always load your tutorial package.
61+
62+
Inside of your tutorial root directory, run link.
63+
64+
> npm link
65+
66+
Inside of your demo root directory, connect the link.
67+
68+
> npm link coderoad-$YOUR-PACKAGE-NAME$
69+
> npm install
70+
71+
72+
### Using Atom
73+
74+
Open *Atom-Coderoad* to view your tutorial. Your package should appear as a loaded package. Click on it.
75+
76+
Reload *Atom* to view changes.
77+
78+
* Windows & Linux: alt-ctrl-r
79+
* Mac: ctrl-alt-cmd-l
File renamed without changes.
File renamed without changes.

_posts/2016-01-05-cli.md

Lines changed: 0 additions & 61 deletions
This file was deleted.
File renamed without changes.

_posts/2016-01-06-cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: docs
3+
title: Coderoad-CLI
4+
id: cli
5+
---

0 commit comments

Comments
 (0)