@toptal/davinci-storybook 0.3.1-alpha-feat-fx-2770-init-command.21 → 0.3.1-alpha-dependabot-github-actions-actions-setup-node-3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,15 +2,6 @@
2
2
 
3
3
  Davinci's support for storybook. Themes, webpack configurations and related tools
4
4
 
5
- ## Install
6
-
7
- To initialize storybook in a project, you can run an initialization command:
8
-
9
- ```shell
10
- npx davinci-storybook-init
11
- ```
12
-
13
- It will install storybook along with predefined addons.
14
5
 
15
6
  ## Usage
16
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-storybook",
3
- "version": "0.3.1-alpha-feat-fx-2770-init-command.21+2b48ffb4",
3
+ "version": "0.3.1-alpha-dependabot-github-actions-actions-setup-node-3.6+aff8bd33",
4
4
  "description": "Davinci Storybook support project, containing configurations, themes, webpack plugins and related tools",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,9 +15,6 @@
15
15
  "homepage": "https://github.com/toptal/davinci/tree/master/packages/storybook#readme",
16
16
  "license": "ISC",
17
17
  "main": "src/index.js",
18
- "bin": {
19
- "davinci-storybook-init": "bin/davinci-storybook-init.js"
20
- },
21
18
  "files": [
22
19
  "src"
23
20
  ],
@@ -39,13 +36,11 @@
39
36
  "@storybook/manager-webpack5": "^6.5.9",
40
37
  "@storybook/react": "^6.5.9",
41
38
  "@storybook/testing-library": "^0.0.13",
42
- "@toptal/davinci-storybook-addons": "0.2.1-alpha-feat-fx-2770-init-command.59+2b48ffb4",
39
+ "@toptal/davinci-storybook-addons": "0.2.1-alpha-dependabot-github-actions-actions-setup-node-3.44+aff8bd33",
43
40
  "babel-loader": "^8.2.5"
44
41
  },
45
42
  "devDependencies": {
46
- "@toptal/davinci-cli-shared": "1.5.5-alpha-feat-fx-2770-init-command.75+2b48ffb4",
47
- "fs-extra": "^10.1.0",
48
43
  "yargs": "^17.5.1"
49
44
  },
50
- "gitHead": "2b48ffb44f9568e6daa19674361904f3aa540c91"
45
+ "gitHead": "aff8bd339ae06ee7c3b717504d08824e47d904d5"
51
46
  }
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { runSync, print, files } = require('@toptal/davinci-cli-shared')
4
- const fs = require('fs-extra')
5
-
6
- print.green('Installing storybook...')
7
- // Description of options https://github.com/storybookjs/storybook/blob/next/lib/cli/src/generate.ts#L30
8
- runSync('npx', ['storybook', 'init', '--force', '--yes', '--skip-install'])
9
-
10
- print.green('Copying storybook files...')
11
-
12
- // Copy .storybook folder from skeleton
13
- runSync('cp', ['-r', './node_modules/@toptal/davinci-skeleton/.storybook', '.'])
14
-
15
- // Copy GH Workflow to deploy storybook to staging
16
- runSync('cp', [
17
- './node_modules/@toptal/davinci-skeleton/.github/workflows/davinci-deploy-storybook-staging.yml',
18
- '.github/workflows/davinci-deploy-storybook-staging.yml',
19
- ])
20
-
21
- // Copy GH Workflow to deploy storybook to temploy
22
- runSync('cp', [
23
- './node_modules/@toptal/davinci-skeleton/.github/workflows/davinci-deploy-storybook-temploy.yml',
24
- '.github/workflows/davinci-deploy-storybook-temploy.yml',
25
- ])
26
-
27
- print.green('Clearing...')
28
-
29
- const packageJsonFilePath = files.getProjectRootFilePath('package.json')
30
- const packageJson = fs.readJsonSync(packageJsonFilePath)
31
-
32
- // remove useless dependencies
33
- const dependenciesToRemove = [
34
- '@storybook/addon-actions',
35
- '@storybook/addon-essentials',
36
- '@storybook/addon-interactions',
37
- '@storybook/addon-links',
38
- '@storybook/builder-webpack4',
39
- '@storybook/manager-webpack4',
40
- '@storybook/builder-webpack5',
41
- '@storybook/manager-webpack5',
42
- ]
43
-
44
- dependenciesToRemove.forEach(
45
- dependency => delete packageJson.devDependencies[dependency]
46
- )
47
-
48
- // remove leftover command
49
- delete packageJson.scripts['build-storybook']
50
-
51
- print.green('Setting up scripts...')
52
-
53
- packageJson.scripts['storybook'] = 'start-storybook -p 6006'
54
- packageJson.scripts['storybook:build'] =
55
- 'build-storybook --docs -c .storybook -o ./storybook-static'
56
-
57
- fs.writeFileSync(
58
- packageJsonFilePath,
59
- JSON.stringify(packageJson, null, 2).concat('\n')
60
- )
61
-
62
- print.green('Installing packages...')
63
-
64
- runSync('yarn', ['install'])