Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Added feature to allow users to select preferred styling lang #209

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CREATE-PLAY.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ Welcome developers! We are as excited as you are to know that you are going to c
<td>Yes</td>
<td>Let the application know your choice of script. It supports both <b>JavaScript</b> and <b>TypeScript</b>. You can pick either of it.</td>
</tr>
<tr>
<td>Style to be used (css/scss)</td>
<td>Yes</td>
<td>Let the application know your choice of style. It supports both <b>css</b> and <b>scss</b>. You can pick either of it.</td>
</tr>
<tr>
<td>What is the level of this play?</td>
<td>Yes</td>
Expand Down
1 change: 1 addition & 0 deletions plop-templates/component_js.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getPlayById } from 'meta/play-meta-util';

import PlayHeader from 'common/playlists/PlayHeader';
import './{{camelCase name}}.{{style}}';

function {{pascalCase name}}(props) {
// Do not remove the below lines.
Expand Down
1 change: 1 addition & 0 deletions plop-templates/component_ts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { getPlayById } from 'meta/play-meta-util';

import PlayHeader from 'common/playlists/PlayHeader';
import './{{camelCase name}}.{{style}}';

function {{pascalCase name}}(props:any) {
// Do not remove the below lines.
Expand Down
1 change: 1 addition & 0 deletions plop-templates/style_css.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* enter stlyes here */
1 change: 1 addition & 0 deletions plop-templates/style_scss.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* enter stlyes here */
11 changes: 11 additions & 0 deletions plopfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ module.exports = plop => {
message: 'Language to be used (javascript/typescript):',
choices: ['js', 'ts']
},
{
type: 'list',
name: 'style',
message: 'Style to be used (css/scss):',
choices: ['css', 'scss']
},
{
type: 'list',
name: 'level',
Expand Down Expand Up @@ -71,6 +77,11 @@ module.exports = plop => {
path: 'src/plays/{{generateFolderName name}}/{{pascalCase name}}.{{language}}x',
templateFile: 'plop-templates/component_{{language}}.hbs',
},
{
type: 'add',
path: 'src/plays/{{generateFolderName name}}/{{camelCase name}}.{{style}}',
templateFile: 'plop-templates/style_{{style}}.hbs',
},
{
type: 'add',
path: 'src/plays/{{generateFolderName name}}/Readme.md',
Expand Down
Binary file modified 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.