Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var directories = [
'./app',
'./app/controllers',
'./app/helpers',
'./app/repositories',
'./app/validations',
'./app/views',
'./app/views/partials'
]
createDirectories(directories, function(result) {
if (result) {
writeBasicAppFiles(function() {
console.warn('New ThinAir has been created successfully!')
})
}
})
function createDirectories(list, callback) {
async.forEachSeries(list, createDirectory, function(err, results) {
callback(true)
})
function createDirectory(name, next) {
fs.mkdir('./app', 0755, function(e) {
if (e) {
console.error('Error while creating', name)
next(e)
} else {
console.warn(' - Created directory:', name)
next()
}
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.