Skip to content

Commit 821a9d8

Browse files
committed
>coderoad docs - init
1 parent 2d3c5b6 commit 821a9d8

File tree

6 files changed

+33
-5
lines changed

6 files changed

+33
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Command line interface for [CodeRoad](http://coderoad.github.io).
1313
- publish [version] _currently instructions only_
1414
- tutorials _coming soon_
1515
- search [query] _currently instructions only_
16+
- docs
1617
- help
1718

1819
### Create

cli.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ var create_1 = require('./src/create/create');
88
var search_1 = require('./src/search/search');
99
var tutorials_1 = require('./src/tutorials/tutorials');
1010
var publish_1 = require('./src/publish/publish');
11+
var docs_1 = require('./src/docs/docs');
1112
program
12-
.version('0.3.5')
13+
.version('0.4.6')
1314
.usage('[options] <keywords>')
1415
.option('-b, --build [path/to/tutorial.md]', 'tutorial markdown file', /^.+\.md$/i)
1516
.option('-c, --create [name]', 'tutorial name')
1617
.option('-p, --publish [version]', 'publish tutorial to npm with new version number')
1718
.option('-t, --tutorials', 'list of tutorial packages')
1819
.option('-s, --search [query]', 'search for tutorial package')
1920
.option('-r, --run', 'run tutorial')
21+
.option('-d, --docs', 'development documentation')
2022
.parse(process.argv);
21-
if (!program.args.length && !program.tutorials && !program.build && !program.search) {
23+
if (!program.args.length &&
24+
!program.build && !program.tutorials && !program.run && !program.docs) {
2225
program.help();
2326
}
2427
else {
@@ -44,5 +47,8 @@ else {
4447
var version = program.args[0];
4548
publish_1.default(version);
4649
}
50+
if (program.docs) {
51+
docs_1.default();
52+
}
4753
process.exit(0);
4854
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coderoad-cli",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "Command line interface for CodeRoad. Build project files.",
55
"keywords": [
66
"coderoad"

src/docs/docs.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"use strict";
2+
var fs = require('fs');
3+
var path = require('path');
4+
function docs() {
5+
console.log('# CODEROAD DEVELOPMENT DOCS\n');
6+
var editorCommands = fs.readFileSync(path.join(__dirname, 'docs', 'editor-commands.md'), 'utf8');
7+
console.log(editorCommands);
8+
}
9+
Object.defineProperty(exports, "__esModule", { value: true });
10+
exports.default = docs;

src/docs/docs/editor-commands.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Editor Commands
2+
3+
* open('$FILENAME$, $OPTIONS$')
4+
open a file
5+
see $OPTIONS$: [atom docs](https://atom.io/docs/api/v1.4.3/Workspace#instance-open)
6+
7+
* set('$TEXT$')
8+
overwrite all content in the active editor with $TEXT$ text
9+
10+
* insert('$TEXT$', $OPTIONS$)
11+
insert $TEXT$ at the bottom of the active editor
12+
see $OPTIONS$: [atom docs](https://atom.io/docs/api/v1.4.3/Selection#instance-insertText)

src/list/list.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ function tutorials() {
44
console.log("List of tutorial packages...");
55
console.log(chalk.red('"Tutorials" feature not implemented yet.'));
66
}
7-
Object.defineProperty(exports, "__esModule", { value: true });
8-
exports.default = tutorials;
7+
exports.tutorials = tutorials;

0 commit comments

Comments
 (0)