5.3.0 • Published 6 months ago

@laboratoria/curriculum-parser v5.3.0

Weekly downloads
24
License
MIT
Repository
-
Last release
6 months ago

@laboratoria/curriculum-parser

Command line tool used to parse content written in markdown at @Laboratoria (See Laboratoria/bootcamp).

Node.js CI Coverage Status

Installation

Install as a development dependency in your project:

npm i --save-dev @laboratoria/curriculum-parser

You should now be able to run it with npx:

npx curriculum-parser # when already installed in project

# or alternatively using full package name (with org)
# this works even if not previously installed.
npx @laboratoria/curriculum-parser

You can also install curriculum-parser globally using npm like this:

npm i -g @laboratoria/curriculum-parser

If you get a permission error please try using sudo (you may need admin permissions depending on your node installation).

# using `sudo` (only if previous step failed)
sudo npm i -g @laboratoria/curriculum-parser

Alternatively you can install using a local clone.

# clone from your own fork
git clone git@github.com:<your-username>/curriculum-parser.git
cd curriculum-parser
npm install
npm link

If the above command fails, try using sudo:

sudo npm link

Upgrade

If you installed globally using npm you can simply re-install like so:

npm i -g @laboratoria/curriculum-parser

If you chose to install using a local clone, you can update your clone to upstream main:

# go into local copy of repo
cd curriculum-parser
# if not yet added a reference to upstream remote we add it
git remote add upstream git@github.com:Laboratoria/curriculum-parser.git
# fetch changes and merge upstream/main into local main
git fetch upstream
git merge upstream/main
# you may also want to push changes to your fork
git push origin main

Usage

After installing globally (or linking with npm link) you should have the curriculum-parser command available in your PATH.

curriculum-parser --help
Usage: curriculum-parser [options] [command]

Options:
  -V                         output the version number
  -h, --help                 display help for command

Commands:
  project [options] <dir>    Parse a project
  topic [options] <dir>      Parse a topic
  part [options] <dir>       Parse a part
  challenge [options] <dir>  Parse a challenge
  help [command]             display help for command

You can also access usage (help) info for individual commands like so:

curriculum-parser project --help
Usage: curriculum-parser project [options] <dir>

Parse a project

Arguments:
  dir                 path to project directory

Options:
  --repo <string>     Repository
  --version <string>  Project version
  --lo <string>       Path to yml file with reference learning objectives
  --debug             Show error stack traces
  -h, --help          display help for command

Examples

Parse a topic within the Laboratoria/bootcamp repo

Parsing a topic and printing the resulting JSON output to stdout.

curriculum-parser topic topics/javascript/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0

Parsing a topic and writing the parser's output (stdout) to a file (using output redirection in the shell).

curriculum-parser topic topics/javascript/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0 \
  > "build/topics/javascript.json"

Parse a specific part of a topic within the Laboratoria/bootcamp repo

curriculum-parser part topics/intro-ux/00-que-es-uxd/00-que-es-uxd/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0

Parse a challenge within the Laboratoria/bootcamp repo

curriculum-parser challenge topics/javascript/01-basics/06-exercises/01-coin-convert/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0

Parse a project within the Laboratoria/bootcamp repo

curriculum-parser project projects/01-cipher/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0 \
  --lo=./learning-objectives

Known tracks

This project contains an array in lib/common.js called knownTracks which contains the list of tracks that are known by the parser.

If a new track is ever going to be added to the curriculum, it must be added to this array or else it'd throw the corresponding Invalid track error.

5.3.0

6 months ago

5.2.0

6 months ago

5.1.0

8 months ago

5.0.0

10 months ago

5.2.0-beta.0

7 months ago

5.0.0-beta.0

10 months ago

5.0.0-beta.1

10 months ago

5.3.0-beta.1

6 months ago

5.1.0-beta.0

8 months ago

5.0.0-alpha.5

11 months ago

5.0.0-alpha.4

1 year ago

5.0.0-alpha.3

1 year ago

5.0.0-alpha.2

1 year ago

5.0.0-alpha.1

1 year ago

4.0.0

2 years ago

3.2.0

2 years ago

3.1.0

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

3.0.0-alpha.1

3 years ago

2.7.1

3 years ago

2.7.0

4 years ago

2.6.0

4 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago