@mateoserrano/simple-config 1.1.2 → 1.1.3
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 +1 -1
- package/src/core/deps.js +3 -3
- package/src/core/utils/urls.js +4 -2
package/package.json
CHANGED
package/src/core/deps.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPackageRoot, moveFromPath } from './utils/index.js'
|
|
2
2
|
import { copyFileToFolderOrSkip } from './files.js'
|
|
3
3
|
|
|
4
4
|
export const getTemplatesFolder = (templatesRelativePath) => {
|
|
5
|
-
const
|
|
6
|
-
return moveFromPath(
|
|
5
|
+
const packageRoot = getPackageRoot()
|
|
6
|
+
return moveFromPath(packageRoot, templatesRelativePath)
|
|
7
7
|
}
|
|
8
8
|
export const getInstallNames = (devDeps) =>
|
|
9
9
|
Object.values(devDeps).map((dep) => `${dep.package}@${dep.version}`)
|
package/src/core/utils/urls.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url'
|
|
2
|
+
import { resolve } from "node:path";
|
|
2
3
|
|
|
3
|
-
export function
|
|
4
|
-
|
|
4
|
+
export function getPackageRoot() {
|
|
5
|
+
const currentDir = fileURLToPath(new URL('.', import.meta.url))
|
|
6
|
+
return resolve(currentDir, '..', '..')
|
|
5
7
|
}
|