Commiting home and demo page with functionality

This commit is contained in:
2020-04-02 19:30:16 +05:30
parent b98749ed00
commit caeca8c287
138 changed files with 4575 additions and 161 deletions

View File

@@ -17,32 +17,32 @@ module.exports = plop => {
type: 'add',
// Plop will create directories for us if they do not exist
// so it's okay to add files in nested locations.
path: 'src/app/components/molecules/{{pascalCase name}}/{{pascalCase name}}.jsx',
path: 'src/components/molecules/{{pascalCase name}}/{{pascalCase name}}.jsx',
templateFile:
'plop-templates/Component/Component.jsx.hbs',
},
{
type: 'add',
path: 'src/app/components/molecules/{{pascalCase name}}/{{pascalCase name}}.test.js',
path: 'src/components/molecules/{{pascalCase name}}/{{pascalCase name}}.test.js',
templateFile:
'plop-templates/Component/Component.test.js.hbs',
},
{
type: 'add',
path:
'src/app/components/molecules/{{pascalCase name}}/{{pascalCase name}}.component.scss',
'src/components/molecules/{{pascalCase name}}/{{pascalCase name}}.component.scss',
templateFile:
'plop-templates/Component/Component.component.scss.hbs',
},
{
type: 'add',
path: 'src/app/components/molecules/{{pascalCase name}}/index.js',
path: 'src/components/molecules/{{pascalCase name}}/index.js',
templateFile: 'plop-templates/Component/index.js.hbs',
},
{
// Adds an index.js file if it does not already exist
type: 'add',
path: 'src/app/components/index.js',
path: 'src/components/index.js',
templateFile: 'plop-templates/injectable-index.js.hbs',
// If index.js already exists in this location, skip this action
skipIfExists: true,
@@ -50,14 +50,14 @@ module.exports = plop => {
{
// Action type 'append' injects a template into an existing file
type: 'append',
path: 'src/app/components/index.js',
path: 'src/components/index.js',
// Pattern tells plop where in the file to inject the template
pattern: `/* PLOP_INJECT_IMPORT */`,
template: `import {{pascalCase name}} from './molecules/{{pascalCase name}}';`,
},
{
type: 'append',
path: 'src/app/components/index.js',
path: 'src/components/index.js',
pattern: `/* PLOP_INJECT_EXPORT */`,
template: `\t{{pascalCase name}},`,
},
@@ -75,43 +75,43 @@ module.exports = plop => {
actions: [
{
type: 'add',
path: 'src/app/pages/{{pascalCase name}}/{{pascalCase name}}.jsx',
path: 'src/pages/{{pascalCase name}}/{{pascalCase name}}.jsx',
templateFile:
'plop-templates/Page/Page.jsx.hbs',
},
{
type: 'add',
path: 'src/app/pages/{{pascalCase name}}/{{pascalCase name}}.test.js',
path: 'src/pages/{{pascalCase name}}/{{pascalCase name}}.test.js',
templateFile:
'plop-templates/Page/Page.test.js.hbs',
},
{
type: 'add',
path:
'src/app/pages/{{pascalCase name}}/{{pascalCase name}}.module.scss',
'src/pages/{{pascalCase name}}/{{pascalCase name}}.module.scss',
templateFile:
'plop-templates/Page/Page.module.scss.hbs',
},
{
type: 'add',
path: 'src/app/pages/{{pascalCase name}}/index.js',
path: 'src/pages/{{pascalCase name}}/index.js',
templateFile: 'plop-templates/Page/index.js.hbs',
},
{
type: 'add',
path: 'src/app/pages/index.js',
path: 'src/pages/index.js',
templateFile: 'plop-templates/injectable-index.js.hbs',
skipIfExists: true,
},
{
type: 'append',
path: 'src/app/pages/index.js',
path: 'src/pages/index.js',
pattern: `/* PLOP_INJECT_IMPORT */`,
template: `import {{pascalCase name}} from './{{pascalCase name}}';`,
},
{
type: 'append',
path: 'src/app/pages/index.js',
path: 'src/pages/index.js',
pattern: `/* PLOP_INJECT_EXPORT */`,
template: `\t{{pascalCase name}},`,
},
@@ -130,24 +130,24 @@ module.exports = plop => {
actions: [
{
type: 'add',
path: 'src/app/services/{{camelCase name}}.js',
path: 'src/services/{{camelCase name}}.js',
templateFile: 'plop-templates/service.js.hbs',
},
{
type: 'add',
path: 'src/app/services/index.js',
path: 'src/services/index.js',
templateFile: 'plop-templates/injectable-index.js.hbs',
skipIfExists: true,
},
{
type: 'append',
path: 'src/app/services/index.js',
path: 'src/services/index.js',
pattern: `/* PLOP_INJECT_IMPORT */`,
template: `import {{camelCase name}} from './{{camelCase name}}';`,
},
{
type: 'append',
path: 'src/app/services/index.js',
path: 'src/services/index.js',
pattern: `/* PLOP_INJECT_EXPORT */`,
template: `\t{{camelCase name}},`,
}
@@ -166,24 +166,24 @@ module.exports = plop => {
actions: [
{
type: 'add',
path: 'src/app/hooks/{{camelCase name}}.js',
path: 'src/hooks/{{camelCase name}}.js',
templateFile: 'plop-templates/hook.js.hbs',
},
{
type: 'add',
path: 'src/app/hooks/index.js',
path: 'src/hooks/index.js',
templateFile: 'plop-templates/injectable-index.js.hbs',
skipIfExists: true,
},
{
type: 'append',
path: 'src/app/hooks/index.js',
path: 'src/hooks/index.js',
pattern: `/* PLOP_INJECT_IMPORT */`,
template: `import {{camelCase name}} from './{{camelCase name}}';`,
},
{
type: 'append',
path: 'src/app/hooks/index.js',
path: 'src/hooks/index.js',
pattern: `/* PLOP_INJECT_EXPORT */`,
template: `\t{{camelCase name}},`,
}