Skip to content

Commit

Permalink
Add dedicated sections
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Jun 6, 2019
1 parent 438ff9a commit 55a104f
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -8,6 +8,9 @@ yarn-error.log*
# VS-Code config
.vscode

# vuepress dist
docs/.vuepress/dist

# Runtime data
pids
*.pid
Expand Down
16 changes: 10 additions & 6 deletions README.md
Expand Up @@ -24,18 +24,22 @@ The user is provided with 30 tasks guiding them through the basic constructs of
- Hurray :+1: you've got your first task.
- Write your solution within a file that is auto-created. For instance, `task<task_number>.py` for Python.
- `teachcode submit` submits the current solution and gives you the next key to proceed if your solution meets all the test cases.
- `teachcode showkeys` shows you all the keys.
- `teachcode showkeys` shows you all the keys.
- `teachcode showcommands` shows you all the commands available for reference.

## Available Commands

| command | description |
| -------------- | ---------------- |
| `teachcode init` | Initializes all the tasks |
| `teachcode fetchtask <key>` | Fetches the task correponding to key provided |
| `teachcode submit` | Submits the current task |
| `teachcode showkeys` | Shows all the keys grabbed |
| `teachcode showcommands` | Lists all the available commands |
| teachcode init | Initializes all the tasks |
| teachcode fetchtask <key> | Fetches the task correponding to key provided |
| teachcode submit | Submits the current task |
| teachcode showkeys | Shows all the keys grabbed |
| teachcode showcommands | Lists all the available commands |

## Contributing

Contributions of any kind are warm welcome. Make sure that you go through these [guidelines](https://teachcode.surge.sh/guide/contributing)

## License

Expand Down
8 changes: 7 additions & 1 deletion docs/.vuepress/config.js
@@ -1,5 +1,6 @@

module.exports = {
base: '/teachcode/',
title: 'teachcode',
description: 'Learn to code effectively',
head: [
Expand All @@ -13,7 +14,12 @@ module.exports = {
],
sidebar: {
'/guide/': [{
title: 'Guide'
title: 'Guide',
children: [
'installation',
'commands',
'contributing'
]
}],
},
docsDir: 'docs',
Expand Down
12 changes: 6 additions & 6 deletions docs/guide/README.md
Expand Up @@ -6,11 +6,11 @@

The user is provided with 30 tasks guiding them through the basic constructs of a preferred programming language. He/she gets a key to access the next task if the current task meets all the test cases. There is also the provision to revisit previously submitted tasks, but it can't be worked on again.

- Navigate to a directory of your choice and fire in teachcode init.
- Navigate to the teachcode-solutions directory.
- Copy and paste the command as instructed within the initial screen teachcode fetchtask {key}.
- Navigate to a directory of your choice and fire in `teachcode init`.
- Navigate to the `teachcode-solutions` directory.
- Copy and paste the command as instructed within the initial screen `teachcode fetchtask {key}`.
- Hurray :tada: you've got your first task.
- Write your solution within a file that is auto-created. For instance, task{task_number}.py for Python.
- Write your solution within a file that is auto-created. For instance, `task{task_number}.py` for Python.
- teachcode submit submits the current solution and gives you the next key to proceed if your solution meets all the test cases.
- teachcode showkeys shows you all the keys.
- teachcode showcommands shows you all the commands available for reference.
- `teachcode showkeys` shows you all the keys.
- `teachcode showcommands` shows you all the commands available for reference.
22 changes: 22 additions & 0 deletions docs/guide/commands.md
@@ -0,0 +1,22 @@
---
title: 'Available Commands'
---

# Available Commands

`teachcode` offers the following set of commands:-

| command | description |
| -------------- | ---------------- |
| teachcode init | Initializes all the tasks |
| teachcode fetchtask \<key\> | Fetches the task correponding to key provided |
| teachcode submit | Submits the current task |
| teachcode showkeys | Shows all the keys grabbed |
| teachcode showcommands | Lists all the available commands |

## Versioning And Help

| option | description
| --- | --- |
| -V, --version | Check CLI version |
| --help, -h | Get help and check usage |
22 changes: 22 additions & 0 deletions docs/guide/contributing.md
@@ -0,0 +1,22 @@
---
title: 'Contributing'
---

# Contributing

## Guidelines

1. Fork and clone the repository.
2. Navigate to the project directory.
3. Now install the dependencies with `npm install`
4. Create a symlink with `npm link` which enables `teachcode` to be accessed globally.
5. Make your desired changes.
6. Make sure that you run `npm run lint` eventhough there is a `pre-commit` hook configured for the purpose.
7. If everything seems to be fine locally, you may push it to the remote repository by switching to another branch and proposing a Pull Request to the base fork.


## Points to ponder

1. Make sure that you submit an issue first if you have something in mind that you're willing to work on.
2. Follow a `rebase` strategy inorder to update your remote branch with the latest changes.
3. Prefix your branch names with `feat/` or `bugfix/` as per the case.
18 changes: 18 additions & 0 deletions docs/guide/installation.md
@@ -0,0 +1,18 @@
---
title: 'Installation'
---

# Installation

## Prerequisites

- [**npm**](https://www.npmjs.com/) it is a package manager for the JavaScript programming language.
- [**node.js**](https://nodejs.org/en/) is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser.
- [**git**](https://git-scm.com/) is a version control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development.

## Quickstart

``` bash
npm install -g teach-code
teachcode init
```

0 comments on commit 55a104f

Please sign in to comment.