Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const patternlab = require('@pattern-lab/core');
const merge = require('deepmerge');
const ask = require('../ask');
const scaffold = require('../scaffold');
const installEdition = require('../install-edition');
const installStarterkit = require('../install-starterkit');
const replaceConfigPaths = require('../replace-config');
const ora = require('ora');
const path = require('path');
const wrapAsync = require('../utils').wrapAsync;
const writeJsonAsync = require('../utils').writeJsonAsync;
const defaultPatternlabConfig = patternlab.getDefaultConfig();
// https://github.com/TehShrike/deepmerge#overwrite-array
const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray;
const init = options =>
wrapAsync(function*() {
const sourceDir = 'source';
const publicDir = 'public';
const exportDir = 'pattern_exports';
const answers = options.projectDir ? options : yield ask(options);
const projectDir = answers.projectDir || './';
const edition = answers.edition;
const starterkit = answers.starterkit;
/**
* Process the init routines
'use strict';
const patternlab = require('@pattern-lab/core');
const config = Object.assign(patternlab.getDefaultConfig(), {
logLevel: 'quiet',
});
module.exports = ({ version }) =>
`${version} (PatternLab Node Core version: ${patternlab(config).version()})`;