mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
20 lines
683 B
JavaScript
Executable File
20 lines
683 B
JavaScript
Executable File
import mergeDirs from 'merge-dirs';
|
|
import path from 'path';
|
|
import { getVersion, getPackageJson, writePackageJson } from '../../lib/helpers';
|
|
|
|
export default async () => {
|
|
const version = await getVersion('@storybook/polymer');
|
|
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
|
|
|
const packageJson = getPackageJson();
|
|
|
|
packageJson.devDependencies = packageJson.devDependencies || {};
|
|
packageJson.devDependencies['@storybook/polymer'] = version;
|
|
|
|
packageJson.scripts = packageJson.scripts || {};
|
|
packageJson.scripts.storybook = 'start-storybook -p 6006';
|
|
packageJson.scripts['build-storybook'] = 'build-storybook';
|
|
|
|
writePackageJson(packageJson);
|
|
};
|