Split project into server and client
This commit is contained in:
20
client/plop-templates/Component/Component.js.hbs
Normal file
20
client/plop-templates/Component/Component.js.hbs
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styles from './{{pascalCase name}}.module.css';
|
||||
|
||||
const {{pascalCase name}} = props => {
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
{{pascalCase name}}.defaultProps = {
|
||||
|
||||
};
|
||||
|
||||
{{pascalCase name}}.propTypes = {
|
||||
|
||||
};
|
||||
|
||||
export default {{pascalCase name}};
|
||||
3
client/plop-templates/Component/Component.module.css.hbs
Normal file
3
client/plop-templates/Component/Component.module.css.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
.c-{{pascalCase name}} {
|
||||
|
||||
}
|
||||
8
client/plop-templates/Component/Component.test.js.hbs
Normal file
8
client/plop-templates/Component/Component.test.js.hbs
Normal file
@@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
import {{pascalCase name}} from './{{pascalCase name}}';
|
||||
|
||||
describe('{{pascalCase name}}', () => {
|
||||
it('renders without error', () => {
|
||||
|
||||
});
|
||||
});
|
||||
3
client/plop-templates/Component/index.js.hbs
Normal file
3
client/plop-templates/Component/index.js.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
import {{pascalCase name}} from './{{pascalCase name}}';
|
||||
|
||||
export default {{pascalCase name}};
|
||||
20
client/plop-templates/Page/Page.js.hbs
Normal file
20
client/plop-templates/Page/Page.js.hbs
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styles from './{{pascalCase name}}.module.css';
|
||||
|
||||
const {{pascalCase name}} = props => {
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
{{pascalCase name}}.defaultProps = {
|
||||
|
||||
};
|
||||
|
||||
{{pascalCase name}}.propTypes = {
|
||||
|
||||
};
|
||||
|
||||
export default {{pascalCase name}};
|
||||
3
client/plop-templates/Page/Page.module.css.hbs
Normal file
3
client/plop-templates/Page/Page.module.css.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
.c-{{pascalCase name}} {
|
||||
|
||||
}
|
||||
8
client/plop-templates/Page/Page.test.js.hbs
Normal file
8
client/plop-templates/Page/Page.test.js.hbs
Normal file
@@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
import {{pascalCase name}} from './{{pascalCase name}}';
|
||||
|
||||
describe('{{pascalCase name}}', () => {
|
||||
it('renders without error', () => {
|
||||
|
||||
});
|
||||
});
|
||||
3
client/plop-templates/Page/index.js.hbs
Normal file
3
client/plop-templates/Page/index.js.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
import {{pascalCase name}} from './{{pascalCase name}}';
|
||||
|
||||
export default {{pascalCase name}};
|
||||
5
client/plop-templates/hook.js.hbs
Normal file
5
client/plop-templates/hook.js.hbs
Normal file
@@ -0,0 +1,5 @@
|
||||
const {{camelCase name}} = () => {
|
||||
|
||||
};
|
||||
|
||||
export default {{camelCase name}};
|
||||
5
client/plop-templates/injectable-index.js.hbs
Normal file
5
client/plop-templates/injectable-index.js.hbs
Normal file
@@ -0,0 +1,5 @@
|
||||
/* PLOP_INJECT_IMPORT */
|
||||
|
||||
export {
|
||||
/* PLOP_INJECT_EXPORT */
|
||||
}
|
||||
17
client/plop-templates/service.js.hbs
Normal file
17
client/plop-templates/service.js.hbs
Normal file
@@ -0,0 +1,17 @@
|
||||
const create{{pascalCase name}} = () => {
|
||||
let examplePrivateVariable = 0
|
||||
|
||||
return {
|
||||
getExamplePrivateVariable: () => {
|
||||
return examplePrivateVariable
|
||||
},
|
||||
setExamplePrivateVariable: (n) => {
|
||||
examplePrivateVariable = n
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const singleton = create{{pascalCase name}}();
|
||||
Object.freeze(singleton);
|
||||
|
||||
export default singleton;
|
||||
Reference in New Issue
Block a user