mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 06:21:23 +08:00
20 lines
713 B
JavaScript
20 lines
713 B
JavaScript
const mergeDirs = require('merge-dirs').default;
|
|
const helpers = require('../../lib/helpers');
|
|
const path = require('path');
|
|
const latestVersion = require('latest-version');
|
|
|
|
module.exports = latestVersion('@storybook/vue').then(version => {
|
|
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
|
|
|
const packageJson = helpers.getPackageJson();
|
|
|
|
packageJson.devDependencies = packageJson.devDependencies || {};
|
|
packageJson.devDependencies['@storybook/vue'] = `^${version}`;
|
|
|
|
packageJson.scripts = packageJson.scripts || {};
|
|
packageJson.scripts.storybook = 'start-storybook -p 6006';
|
|
packageJson.scripts['build-storybook'] = 'build-storybook';
|
|
|
|
helpers.writePackageJson(packageJson);
|
|
});
|