first commit

This commit is contained in:
2026-09-08 20:28:54 +08:00
commit 2ada8d3d5a
37380 changed files with 4886169 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
const path = require('path')
const {
normalizePath
} = require('@dcloudio/uni-cli-shared')
const {
getPlatformExts
} = require('../shared')
const templateExt = getPlatformExts().template
const SLOTS_OUTPUT_PATH = '/[root]common/slots'
function getRelativePath (from, to) {
let relativePath = path.relative(from, to)
if (relativePath.indexOf('.') !== 0) {
relativePath = './' + relativePath
}
return normalizePath(relativePath)
}
function getSlotsPath (root) {
return SLOTS_OUTPUT_PATH.replace('[root]', root) + templateExt
}
module.exports = {
getSlotsPath,
getRelativePath
}