mirror of
https://github.com/chenasraf/simple-scaffold.git
synced 2026-05-17 17:28:09 +00:00
36 lines
817 B
TypeScript
36 lines
817 B
TypeScript
import SimpleScaffold from "./scaffold"
|
|
import * as path from "path"
|
|
|
|
const templateDir = path.join(process.cwd(), "examples")
|
|
|
|
new SimpleScaffold({
|
|
templates: [templateDir + "/test-input/Component/**/*"],
|
|
output: templateDir + "/test-output/no-create-subpath",
|
|
createSubfolder: false,
|
|
locals: {
|
|
property: "myProp",
|
|
value: '"value"',
|
|
},
|
|
}).run()
|
|
|
|
new SimpleScaffold({
|
|
templates: [templateDir + "/test-input/Component/**/*"],
|
|
output: templateDir + "/test-output",
|
|
locals: {
|
|
property: "myProp",
|
|
value: '"value"',
|
|
},
|
|
}).run()
|
|
|
|
new SimpleScaffold({
|
|
templates: [templateDir + "/test-input/Component/**/*"],
|
|
output: (file, basedir, basename) => {
|
|
console.log({ file, basedir, basename })
|
|
return file
|
|
},
|
|
locals: {
|
|
property: "myProp",
|
|
value: '"value"',
|
|
},
|
|
}).run()
|