diff --git a/plop-templates/component_js.hbs b/plop-templates/component_js.hbs index 7d45b8937..e978e4f51 100644 --- a/plop-templates/component_js.hbs +++ b/plop-templates/component_js.hbs @@ -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. diff --git a/plop-templates/component_ts.hbs b/plop-templates/component_ts.hbs index 6941972c0..508a1e816 100644 --- a/plop-templates/component_ts.hbs +++ b/plop-templates/component_ts.hbs @@ -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. diff --git a/plop-templates/style_css.hbs b/plop-templates/style_css.hbs new file mode 100644 index 000000000..b9a8d5b71 --- /dev/null +++ b/plop-templates/style_css.hbs @@ -0,0 +1 @@ +/* enter stlyes here */ \ No newline at end of file diff --git a/plop-templates/style_scss.hbs b/plop-templates/style_scss.hbs new file mode 100644 index 000000000..b9a8d5b71 --- /dev/null +++ b/plop-templates/style_scss.hbs @@ -0,0 +1 @@ +/* enter stlyes here */ \ No newline at end of file diff --git a/plopfile.js b/plopfile.js index ac9b407ed..027905f5c 100644 --- a/plopfile.js +++ b/plopfile.js @@ -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', @@ -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',