@magicspace/core
Advanced tools
Comparing version 0.3.4 to 0.3.5
import * as ChildProcess from 'child_process'; | ||
import { createRequire } from 'module'; | ||
import * as Path from 'path'; | ||
import { pathToFileURL } from 'url'; | ||
import FSExtra from 'fs-extra'; | ||
@@ -125,5 +126,5 @@ import npmPath from 'npm-path'; | ||
catch (_a) { | ||
return import(path); | ||
return import(pathToFileURL(path).href); | ||
} | ||
} | ||
//# sourceMappingURL=@utils.js.map |
@@ -0,4 +1,11 @@ | ||
import { fileURLToPath } from 'url'; | ||
import getCallerFile from 'get-caller-file'; | ||
export function boilerplate(builder) { | ||
const filename = getCallerFile(); | ||
let filename = getCallerFile(); | ||
try { | ||
filename = fileURLToPath(filename); | ||
} | ||
catch (_a) { | ||
// ignore | ||
} | ||
return async (...args) => ({ | ||
@@ -5,0 +12,0 @@ filename, |
import * as FS from 'fs'; | ||
import * as Path from 'path'; | ||
import FastGlob from 'fast-glob'; | ||
import * as Handlebars from 'handlebars'; | ||
import Handlebars from 'handlebars'; | ||
import { removePathExtension } from './@utils.js'; | ||
@@ -6,0 +6,0 @@ export function text(...args) { |
{ | ||
"name": "@magicspace/core", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"publishConfig": { | ||
@@ -37,3 +37,3 @@ "access": "public" | ||
}, | ||
"gitHead": "be094816c1d6528c7838f1dfcf05a76ade347cf5" | ||
"gitHead": "f92254a264aa19ef1a2daa0f3c8a6360218f2392" | ||
} |
import * as ChildProcess from 'child_process'; | ||
import {createRequire} from 'module'; | ||
import * as Path from 'path'; | ||
import {pathToFileURL} from 'url'; | ||
@@ -123,4 +124,4 @@ import FSExtra from 'fs-extra'; | ||
} catch { | ||
return import(path); | ||
return import(pathToFileURL(path).href); | ||
} | ||
} |
@@ -0,1 +1,3 @@ | ||
import {fileURLToPath} from 'url'; | ||
import getCallerFile from 'get-caller-file'; | ||
@@ -52,4 +54,10 @@ import type * as x from 'x-value'; | ||
): BoilerplateBuilder<TOptions> { | ||
const filename = getCallerFile(); | ||
let filename = getCallerFile(); | ||
try { | ||
filename = fileURLToPath(filename); | ||
} catch { | ||
// ignore | ||
} | ||
return async (...args) => ({ | ||
@@ -56,0 +64,0 @@ filename, |
@@ -5,3 +5,3 @@ import * as FS from 'fs'; | ||
import FastGlob from 'fast-glob'; | ||
import * as Handlebars from 'handlebars'; | ||
import Handlebars from 'handlebars'; | ||
@@ -8,0 +8,0 @@ import {removePathExtension} from './@utils.js'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
131264
2828