This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.templatemanrc.js
124 lines (124 loc) · 3.2 KB
/
.templatemanrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/**
* Templateman config
* @see https://github.com/adlite/templateman
*/
module.exports = {
templates: [
{
name: 'React Component Function',
files: [
{
from: './templates/react-func.tm',
to: './components/${TM:COMPONENT_NAME}/${TM:COMPONENT_NAME}.tsx',
},
{
from: './templates/style-file.scss.tm',
to: './components/${TM:COMPONENT_NAME}/style.module.scss',
},
{
from: './templates/export-module.tm',
to: './components/${TM:COMPONENT_NAME}/index.ts',
},
{
from: './templates/storybook-stories.tm',
to: './components/${TM:COMPONENT_NAME}/${TM:COMPONENT_NAME}.stories.tsx',
},
],
},
{
name: 'React Component Class',
files: [
{
from: './templates/react-class.tm',
to: './components/${TM:COMPONENT_NAME}/${TM:COMPONENT_NAME}.tsx',
},
{
from: './templates/style-file.scss.tm',
to: './components/${TM:COMPONENT_NAME}/style.module.scss',
},
{
from: './templates/export-module.tm',
to: './components/${TM:COMPONENT_NAME}/index.ts',
},
{
from: './templates/storybook-stories.tm',
to: './components/${TM:COMPONENT_NAME}/${TM:COMPONENT_NAME}.stories.tsx',
},
],
},
{
name: 'Next Page',
files: [
{
from: './templates/next-page.tm',
to: './pages/${TM:URL}.tsx',
},
],
},
{
name: 'Next Page with SSG',
files: [
{
from: './templates/next-page-ssg.tm',
to: './pages/${TM:URL}.tsx',
},
],
},
{
name: 'Next Page with SSR',
files: [
{
from: './templates/next-page-ssr.tm',
to: './pages/${TM:URL}.tsx',
},
],
},
{
name: 'React Section',
files: [
{
from: './templates/export-module.tm',
to: './sections/${TM:PAGE_ROUTE}/${TM:COMPONENT_NAME}/index.ts',
},
{
from: './templates/react-section.tm',
to: './sections/${TM:PAGE_ROUTE}/${TM:COMPONENT_NAME}/${TM:COMPONENT_NAME}.tsx',
},
{
from: './templates/style-file.scss.tm',
to: './sections/${TM:PAGE_ROUTE}/${TM:COMPONENT_NAME}/style.module.scss',
},
],
},
{
name: 'Next API route',
files: [
{
from: './templates/next-api-route.tm',
to: './pages/api/${TM:URL}.tsx',
},
],
},
{
name: 'React Component Function (partial)',
files: {
from: './templates/react-func.tm',
to: './components/${TM:PARENT_COMPONENT_NAME}/${TM:COMPONENT_NAME}.tsx',
},
},
{
name: 'React Component Class (partial)',
files: {
from: './templates/react-class.tm',
to: './components/${TM:PARENT_COMPONENT_NAME}/${TM:COMPONENT_NAME}.tsx',
},
},
{
name: 'Storybook Stories (partial)',
files: {
from: './templates/storybook-stories.tm',
to: './components/${TM:PARENT_COMPONENT_NAME}/${TM:COMPONENT_NAME}.stories.tsx',
},
},
],
};