mirror of
https://github.com/chenasraf/templates.git
synced 2026-05-17 17:38:07 +00:00
52 lines
1.0 KiB
JavaScript
52 lines
1.0 KiB
JavaScript
// @ts-check
|
|
const BASE = 'gen/react'
|
|
/**
|
|
* @param {string} folder
|
|
* @returns import('simple-scaffold').ScaffoldConfig
|
|
*/
|
|
const reactComp = (folder) => {
|
|
return {
|
|
templates: [`${BASE}/component`],
|
|
output: `src/components/${folder}`,
|
|
data: {
|
|
element: 'div',
|
|
},
|
|
}
|
|
}
|
|
|
|
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
|
|
module.exports = {
|
|
editorfile: {
|
|
templates: ['gen/editorfile'],
|
|
output: '.',
|
|
name: '-',
|
|
},
|
|
'typescript.lints': {
|
|
templates: ['gen/ts-lints'],
|
|
output: '.',
|
|
name: '-',
|
|
},
|
|
github: {
|
|
templates: ['gen/github'],
|
|
output: '.',
|
|
name: '-',
|
|
},
|
|
'github.pnpm': {
|
|
templates: ['gen/github-pnpm'],
|
|
output: '.',
|
|
name: '-',
|
|
},
|
|
'react.atom': reactComp('atoms'),
|
|
'react.molecule': reactComp('molecules'),
|
|
'react.organism': reactComp('organisms'),
|
|
'react.page': {
|
|
templates: [`${BASE}/page`],
|
|
output: `src/pages`,
|
|
},
|
|
'react.utils': {
|
|
templates: [`${BASE}/utils`],
|
|
output: `src/utils`,
|
|
name: '<utils>',
|
|
},
|
|
}
|