@nx/storybook 22.0.0-beta.6 → 22.0.0-beta.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/storybook",
3
- "version": "22.0.0-beta.6",
3
+ "version": "22.0.0-beta.8",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.",
6
6
  "repository": {
@@ -33,16 +33,16 @@
33
33
  "migrations": "./migrations.json"
34
34
  },
35
35
  "dependencies": {
36
- "@nx/devkit": "22.0.0-beta.6",
36
+ "@nx/devkit": "22.0.0-beta.8",
37
37
  "@phenomnomnominal/tsquery": "~5.0.1",
38
38
  "semver": "^7.5.3",
39
39
  "tslib": "^2.3.0",
40
- "@nx/cypress": "22.0.0-beta.6",
41
- "@nx/js": "22.0.0-beta.6",
42
- "@nx/eslint": "22.0.0-beta.6"
40
+ "@nx/cypress": "22.0.0-beta.8",
41
+ "@nx/js": "22.0.0-beta.8",
42
+ "@nx/eslint": "22.0.0-beta.8"
43
43
  },
44
44
  "devDependencies": {
45
- "nx": "22.0.0-beta.6"
45
+ "nx": "22.0.0-beta.8"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "storybook": ">=7.0.0 <10.0.0"
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/storybook/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AASpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAqElC,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAEvD;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAuDrE;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/storybook/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AASpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAqElC,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAEvD;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAiErE;AAED,eAAe,aAAa,CAAC"}
@@ -81,6 +81,16 @@ async function initGeneratorInternal(tree, schema) {
81
81
  'static:storybook',
82
82
  'storybook:static',
83
83
  ],
84
+ buildDepsTargetName: [
85
+ 'build-deps',
86
+ 'storybook:build-deps',
87
+ 'storybook-build-deps',
88
+ ],
89
+ watchDepsTargetName: [
90
+ 'watch-deps',
91
+ 'storybook:watch-deps',
92
+ 'storybook-watch-deps',
93
+ ],
84
94
  }, schema.updatePackageScripts);
85
95
  (0, update_gitignore_1.updateGitignore)(tree);
86
96
  }
@@ -4,6 +4,8 @@ export interface StorybookPluginOptions {
4
4
  serveStorybookTargetName?: string;
5
5
  staticStorybookTargetName?: string;
6
6
  testStorybookTargetName?: string;
7
+ buildDepsTargetName?: string;
8
+ watchDepsTargetName?: string;
7
9
  }
8
10
  /**
9
11
  * @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/storybook/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,aAAa,EAOd,MAAM,YAAY,CAAC;AAYpB,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAeD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,sBAAsB,CA4B7D,CAAC;AAEF,eAAO,MAAM,aAAa,uCAAc,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/storybook/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,aAAa,EAQd,MAAM,YAAY,CAAC;AAepB,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAeD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,sBAAsB,CA4B7D,CAAC;AAEF,eAAO,MAAM,aAAa,uCAAc,CAAC"}
@@ -11,6 +11,8 @@ const js_1 = require("@nx/js");
11
11
  const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
12
12
  const file_hasher_1 = require("nx/src/hasher/file-hasher");
13
13
  const tsquery_1 = require("@phenomnomnominal/tsquery");
14
+ const util_1 = require("@nx/js/src/plugins/typescript/util");
15
+ const pmc = (0, devkit_1.getPackageManagerCommand)();
14
16
  function readTargetsCache(cachePath) {
15
17
  return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
16
18
  }
@@ -89,6 +91,7 @@ async function buildStorybookTargets(configFilePath, projectRoot, options, conte
89
91
  targets[options.testStorybookTargetName] = testTarget(projectRoot);
90
92
  }
91
93
  targets[options.staticStorybookTargetName] = serveStaticTarget(options, projectRoot);
94
+ (0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
92
95
  return targets;
93
96
  }
94
97
  function buildTarget(namedInputs, outputs, projectRoot, frameworkIsAngular, projectName, configFilePath) {
@@ -235,6 +238,8 @@ function normalizeOptions(options) {
235
238
  serveStorybookTargetName: options.serveStorybookTargetName ?? 'storybook',
236
239
  testStorybookTargetName: options.testStorybookTargetName ?? 'test-storybook',
237
240
  staticStorybookTargetName: options.staticStorybookTargetName ?? 'static-storybook',
241
+ buildDepsTargetName: options.buildDepsTargetName ?? 'build-deps',
242
+ watchDepsTargetName: options.watchDepsTargetName ?? 'watch-deps',
238
243
  };
239
244
  }
240
245
  function buildProjectName(projectRoot, workspaceRoot) {