Skip to content

Commit 1e5ad45

Browse files
committed
feat: 🎸 add structure generator
1 parent fa17972 commit 1e5ad45

17 files changed

Lines changed: 224 additions & 0 deletions

File tree

‎.yo-rc.json.dist‎

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as emoji from "node-emoji";
2+
import Generator from "yeoman-generator";
3+
4+
export = class StructureModuleGenerator extends Generator {
5+
public async prompting() {
6+
// tslint:disable-next-line
7+
console.log("Module generator");
8+
}
9+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export namespace <%= name %>Api {
3+
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export type <%= name %>Dto = {
3+
4+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { <%= name %>Dto } from '../dto/<%= name %>Dto';
2+
import { <%= name %> } from '../../model/<%= name %>';
3+
4+
export namespace <%= name %>Mapper {
5+
export const map = (<%= nameCamelCase %>: <%= name %>Dto): <%= name %> => ({
6+
...<%= nameCamelCase %>
7+
});
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export namespace <%= name %>Mock {
3+
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as emoji from "node-emoji";
2+
import Generator from "yeoman-generator";
3+
4+
export = class StructureModuleGenerator extends Generator {
5+
public async prompting() {
6+
// tslint:disable-next-line
7+
console.log("Module generator");
8+
}
9+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import * as React from 'react';
2+
import { compose } from 'redux';
3+
4+
import { Wrapper } from './<%= name %>.style';
5+
6+
type StatProps = {
7+
8+
}
9+
10+
type DispatchProps = {
11+
12+
}
13+
14+
type Props = StatProps & DispatchProps & {
15+
16+
}
17+
18+
class <%= name %>Pure extends React.Component<Props> {
19+
20+
render() {
21+
return (
22+
<Wrapper>
23+
</Wrapper>
24+
)
25+
}
26+
}
27+
28+
export const <%= name %> = compose(
29+
30+
)(<%= name %>Pure);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import * as React from 'react';
2+
import { compose } from 'redux';
3+
4+
import { Wrapper } from './<%= name %>.style';
5+
6+
type StatProps = {
7+
8+
}
9+
10+
type DispatchProps = {
11+
12+
}
13+
14+
type Props = StatProps & DispatchProps & {
15+
16+
}
17+
18+
class <%= name %>Pure extends React.Component<Props> {
19+
20+
render() {
21+
return (
22+
<Wrapper>
23+
</Wrapper>
24+
)
25+
}
26+
}
27+
28+
export const <%= name %> = compose(
29+
30+
)(<%= name %>Pure);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import * as React from 'react';
2+
import { compose } from 'redux';
3+
4+
import { Wrapper } from './<%= name %>.style';
5+
6+
type StatProps = {
7+
8+
}
9+
10+
type DispatchProps = {
11+
12+
}
13+
14+
type Props = StatProps & DispatchProps & {
15+
16+
}
17+
18+
class <%= name %>Pure extends React.Component<Props> {
19+
20+
render() {
21+
return (
22+
<Wrapper>
23+
</Wrapper>
24+
)
25+
}
26+
}
27+
28+
export const <%= name %> = compose(
29+
30+
)(<%= name %>Pure);

0 commit comments

Comments
 (0)