@modern-js/utils 2.5.1-alpha.1 → 2.5.1-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ export declare const getTargetDir: (from: string, baseDir: string, targetBaseDir: string) => string;
@@ -0,0 +1,37 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
+ mod
22
+ ));
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var getTargetDir_exports = {};
25
+ __export(getTargetDir_exports, {
26
+ getTargetDir: () => getTargetDir
27
+ });
28
+ module.exports = __toCommonJS(getTargetDir_exports);
29
+ var path = __toESM(require("path"));
30
+ const getTargetDir = (from, baseDir, targetBaseDir) => {
31
+ const relativePath = path.relative(baseDir, from);
32
+ return path.resolve(targetBaseDir, relativePath);
33
+ };
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ getTargetDir
37
+ });
package/dist/index.d.ts CHANGED
@@ -41,4 +41,5 @@ export * from './plugin';
41
41
  export * from './routes';
42
42
  export * from './test-utils';
43
43
  export * from './getCoreJsVersion';
44
- export * from './react';
44
+ export * from './react';
45
+ export * from './getTargetDir';
package/dist/index.js CHANGED
@@ -58,3 +58,4 @@ __reExport(src_exports, require("./routes"), module.exports);
58
58
  __reExport(src_exports, require("./test-utils"), module.exports);
59
59
  __reExport(src_exports, require("./getCoreJsVersion"), module.exports);
60
60
  __reExport(src_exports, require("./react"), module.exports);
61
+ __reExport(src_exports, require("./getTargetDir"), module.exports);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.5.1-alpha.1",
14
+ "version": "2.5.1-alpha.2",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/index.d.ts",
17
17
  "main": "./dist/index.js",