Skip to content

Commit

Permalink
[Feature] Added feature to allow users to select preferred styling la…
Browse files Browse the repository at this point in the history
…nguage
  • Loading branch information
nrshnaik committed May 21, 2022
1 parent 47404cf commit 88b7c70
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
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 './{{pascalCase name}}.{{styling}}';

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 './{{pascalCase name}}.{{styling}}';

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: 'styling',
message: 'Styling 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}}/{{pascalCase name}}.{{styling}}',
templateFile: 'plop-templates/style_{{styling}}.hbs',
},
{
type: 'add',
path: 'src/plays/{{generateFolderName name}}/Readme.md',
Expand Down

0 comments on commit 88b7c70

Please sign in to comment.