Skip to content

Commit

Permalink
馃摑 Started with the create play doc
Browse files Browse the repository at this point in the history
  • Loading branch information
atapas committed Apr 4, 2022
1 parent 122bf98 commit 646b2dc
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
42 changes: 42 additions & 0 deletions CREATE-PLAY.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# Create a Play

## Table of Contents
- [Steps to Create a Play](#steps-to-create-a-play)
- [Learn about the behind scenes](#learn-about-the-behind-scenes)
- [Frequently Asked Questions](#faq)

### Steps to Create a Play
Welcome developers! Here are some things you can do to get started with your `Play` creation.

- Open a command prompt in your project folder.
- Run the following command:
```shell
yarn install
# or
npm install
```
- After the installation is complete, run the following command:
```shell
yarn plop
```
- This will ask a few questions about your `Play` and then perform required steps to create the play. The screen shot below shows the output of the command.
<p align="center">
<img src="./screens/plop-create.png" alt="plop create" />
</p>
Please find the description of each of the questions in the table below.


- Now you can run the app using the following command:
```shell
yarn start
# or
npm start
```
- You can now see your play added to the [play board](http:https://localhost:3000/plays) page. You can click on the play thumbnail to see the details of the play.

### Learn about the behind scenes
TBA

### FAQ
TBA


1 change: 1 addition & 0 deletions plop-templates/play.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
level: '{{level}}',
tags: '{{tags}}',
github: '{{github}}',
cover: '{{cover}}',
blog: '{{blog}}',
video: '{{video}}'
}, //replace new play item here
7 changes: 6 additions & 1 deletion plopfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = plop => {
// demo generator
plop.setGenerator('play', {
description: 'add a new play',
description: 'Steps to add a new play',
prompts: [
{
type: 'input',
Expand Down Expand Up @@ -30,6 +30,11 @@ module.exports = plop => {
name: 'folder',
message: 'Provide the folder name(Example: identity-card):',
},
{
type: 'input',
name: 'cover',
message: 'Please provide the path(URL) to cover image(When the image is hosted publicly):',
},
{
type: 'list',
name: 'level',
Expand Down
Binary file added screens/plop-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 646b2dc

Please sign in to comment.