# Meted Lesson Generator

## Generating a Lesson Template

To get started generating a lesson you'll have to download the **MetEd Lesson Generator**. This [**Yeoman ↗**](https://yeoman.io/) generator requires [**Node.js ↗**](https://nodejs.org/en/), **Git**, and usage of [**NPM ↗**](https://www.npmjs.com/) as the package manager.

### Installation <a href="#installation" id="installation"></a>

***

To begin installing or updating **Yeoman** and the **MetEd Lesson Generator** to their latest available package.

Run the following command to install **Yeoman** globally:

```bash
npm install -g yo
```

Then, run the following command to install the **MetEd Lesson Generator** globally:

```bash
npm install -g https://github.com/UCAR-COMET/generator-metedlesson.git
```

## Run the Generator

***

To run the lesson generator, navigate to another directory where you would like to build the new lesson, and run the following commands.

```bash
mkdir YOUR_DIRECTORY
 
cd YOUR_DIRECTORY/
 
yo metedlesson 
```

You should see a the CLI with a greeting and prompts to generate a lesson. Follow the prompts to generate a lesson in English, Spanish or French.

You'll need to have the Active Project handy to fill out the items in the prompts. Items in uppercase are the defaults, if nothing is selected or entered. You can hit `ctrl + c` if you made a mistake to terminate the process, and you can restart the generator process; simply enter the yo metedlesson command to run again. You may be prompted to overwrite anything previously generated.

## Finalizing <a href="#finalizing" id="finalizing"></a>

***

Once the **MetEd Lesson Generator** has completed, you can open the directory in the file explorer, and you'll find two folders that the generator made:

* build
* dist

All the contents inside of **build** should have all the template files that you'll need to migrate to the project's directory in deved. No additional changes should need to be made to the Lesson Template if all the prompts were completed correctly while running the generator.

The entire contents of the build folder can now be directly copied into its respective *deved* directory.

{% hint style="warning" %}
The contents inside of **dist** are experimental. **DO NOT** use for production.
{% endhint %}
