Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import chalk from 'chalk'
import Metalsmith from 'metalsmith'
import Handlebars from 'handlebars'
import async from 'async'
import { handlebars } from 'consolidate'
import path from 'path'
import multimatch from 'multimatch'
import getOptions, { getMetadata } from './options'
import logger from './logger'
import ask from './ask'
import filter from './filter'
import uuid from 'uuid/v4'
import { readJsonSync } from 'fs-extra'
import { existsFile } from './exists'
const render = handlebars.render
const defaultMeta = (modules = [], dest) => {
const result = {}
modules.forEach(module => {
// if (module === 'offline-package') {
// result['offline'] = true
// } else {
// result[module] = true
// }
result[module] = true
})
return Object.assign(result, {
destDirName: modules.join('-'),
inPlace: dest === process.cwd(),
noEscape: true,
})
}