Find LearnPack at npm, click here to download the package: https://www.npmjs.com/package/@learnpack/learnpack.
(Make sure you have node installed before going to the next step!)
In order to create your first tutorial, you have to follow these steps:
- 1.Install LearnPack globally on your computer by running this command (You should have node installed):
npm install @learnpack/learnpack -g
- 2.Go to the path where you want to save the tutorial’s repository, and create the directory where you want them to be:
- 3.Then run this command to start configuring your tutorial:
learnpack initThis command will ask you everything about your tutorial’s configuration, answer all the questions and your tutorial’s project will be successfully created. These are the questions it will ask you:
It will create all the files of your tutorial.This is what your project should look like:
- 1.First, it will ask you the grading type (Grading Tutorials) you want for your tutorial:
- 1.Incremental: In this type of exercise you can’t go to the next exercise until you pass the test of the current one. It is incremental, so further exercises require the knowledge of previous exercises.
- 2.Isolated: Each exercise is independent so you can go to any exercise in the order you prefer. The latest exercises don’t need earlier exercises’ knowledge.
- 3.No Grading: These exercises aren’t graded, therefore they don’t have tests.
- 2.Now it will ask for the tutorial’s title.
- 3.It should ask for the description after the title.
- 4.Then it will ask you for the difficulty of your tutorial exercises (Beginner, Easy, Intermediate, Hard).
- 5.The next question will be how many hours it should take to complete the tutorial.
- 4.Now you have to add the folder of each of the exercises that you are going to add to your tutorial with a structure similar to the one created by the command
learnpack init. It should have the README.md file, the test file, and the entry file, the last two files depend on the language you are using.
- 1.In order to install it, run the
npm install @learnpack/learnpack -g.
- 2.Install the tutorial you want to use by executing the following command:
learnpack download <name-of-tutorial>or you can choose the tutorial by running
learnpack downloadthis will display a list of all the tutorials.
- 3.Install the LearnPack plugin that you need depending on the programming language that the tutorial uses. here is more information about LearnPack Compiler Plugins.
- 4.After installing everything, the last step to start using LearnPack, is running the command
Ready to start learning!