https://github.com/serapath/puke
scaffolds a folder structure from a jsonish description
https://github.com/serapath/puke
boilerplate scaffold
Last synced: 9 months ago
JSON representation
scaffolds a folder structure from a jsonish description
- Host: GitHub
- URL: https://github.com/serapath/puke
- Owner: serapath
- License: mit
- Created: 2015-09-27T23:48:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-12T12:54:17.000Z (over 7 years ago)
- Last Synced: 2025-02-14T17:42:07.960Z (over 1 year ago)
- Topics: boilerplate, scaffold
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# puke
scaffolds a folder structure from a jsonish description
# example
`npm install puke`
```js
const puke = require('puke')
const name = 'module-foobar'
// in current directory (=== process.cwd())
const foldername = name
puke(foldername, scaffold(name))
// => creates in .//* the directory structure
// specified in the `scaffold` function below
function scaffold (name) {
return {
"node_modules": {
"level-callerid": {
"index.js": `
`,
"package.json": `
`
}
},
[`source-${name}`]: {
"node_modules": {
"d": {
"d.js": `
`,
"package.json": `
`
},
"e": {
"node_modules": {
"d": {
"d.js": `
`,
"package.json": `
`
}
},
"e.js": `
`,
"f.js": `
`,
"package.json": `
`
}
},
"index.js": `
`
},
"a.js": `
`,
"b.js": `
`,
"c.js": `
`,
"package.json": `
`
}
}
```