@makcbrain/storybook-builder-esbuild 1.0.3 → 1.2.0

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.
@@ -1,5 +1,16 @@
1
1
  import { join } from 'node:path';
2
+ import { cache } from 'empathic/package';
2
3
  import { DIST_DIR_NAME } from '../constants.js';
3
4
  export const getAbsolutePathToDistDir = (options) => {
5
+ const cacheDir = cache(`@makcbrain-storybook-builder-esbuild`, {
6
+ create: true,
7
+ cwd: options.configDir,
8
+ });
9
+ if (cacheDir) {
10
+ return cacheDir;
11
+ }
12
+ console.warn('[@makcbrain/storybook-builder-esbuild] Could not find or create cache directory in node_modules/.cache. ' +
13
+ `Using ${DIST_DIR_NAME} directory in .storybook instead. ` +
14
+ 'Please ensure this directory is added to .gitignore and linter exclusions.');
4
15
  return join(options.configDir, DIST_DIR_NAME);
5
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makcbrain/storybook-builder-esbuild",
3
- "version": "1.0.3",
3
+ "version": "1.2.0",
4
4
  "author": "Maksim Kadochnikov <makс.brain@gmail.com>",
5
5
  "description": "Builder for Storybook with supporting esbuild",
6
6
  "license": "MIT",
@@ -47,11 +47,12 @@
47
47
  "@fal-works/esbuild-plugin-global-externals": "2.1.2",
48
48
  "@mdx-js/esbuild": "3.1.1",
49
49
  "dedent": "1.7.0",
50
+ "empathic": "2.0.0",
50
51
  "glob": "11.0.3",
51
52
  "react-docgen": "8.0.2",
52
53
  "slash": "5.1.0"
53
54
  },
54
55
  "peerDependencies": {
55
- "esbuild": "^0.10.0"
56
+ "esbuild": ">=0.10.0"
56
57
  }
57
58
  }