storybook-onbook-plugin 0.2.5 → 0.2.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/dist/cli/index.js CHANGED
@@ -245,9 +245,10 @@ function getStorybookCommand(storybookDir) {
245
245
  console.log(
246
246
  `\u{1F4E6} Detected package manager: ${pm}${repoRoot ? ` (from ${repoRoot})` : ""}`
247
247
  );
248
+ const separator = pm === "npm" || pm === "pnpm" ? ["--"] : [];
248
249
  return {
249
- command: "storybook",
250
- args: ["dev", "-p", "6006", "--no-open"]
250
+ command: pm,
251
+ args: ["run", "storybook", ...separator, "-p", "6006", "--no-open"]
251
252
  };
252
253
  }
253
254
  async function isStorybookRunning(url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-onbook-plugin",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "storybook-onbook-plugin": "./dist/cli/index.js"