@dcloudio/uni-cli-shared
Advanced tools
Comparing version 0.2.8 to 0.2.9
@@ -31,2 +31,3 @@ const tags = require('./tags') | ||
normalizePath, | ||
getComponentName, | ||
convertStaticStyle | ||
@@ -83,2 +84,3 @@ } = require('./util') | ||
parseManifestJson, | ||
getComponentName, | ||
convertStaticStyle, | ||
@@ -85,0 +87,0 @@ jsPreprocessOptions, |
@@ -0,0 +0,0 @@ const fs = require('fs') |
const fs = require('fs') | ||
const path = require('path') | ||
const uniRuntime = '@dcloudio/vue-cli-plugin-uni/packages/mp-vue' | ||
const mpvueRuntime = '@dcloudio/vue-cli-plugin-uni/packages/mpvue' | ||
const megaloRuntime = '@dcloudio/vue-cli-plugin-uni/packages/megalo' | ||
const uniCompiler = '@dcloudio/uni-template-compiler' | ||
const mpvueCompiler = '@dcloudio/vue-cli-plugin-uni/packages/mpvue-template-compiler' | ||
const megaloCompiler = '@megalo/template-compiler' | ||
const PLATFORMS = { | ||
@@ -20,4 +28,4 @@ 'h5': { | ||
}, | ||
vue: '@dcloudio/vue-cli-plugin-uni/packages/mpvue', | ||
compiler: '@dcloudio/vue-cli-plugin-uni/packages/mpvue-template-compiler', | ||
vue: mpvueRuntime, | ||
compiler: mpvueCompiler, | ||
megalo: false, | ||
@@ -35,4 +43,4 @@ subPackages: false, | ||
}, | ||
vue: '@dcloudio/vue-cli-plugin-uni/packages/mpvue', | ||
compiler: '@dcloudio/vue-cli-plugin-uni/packages/mpvue-template-compiler', | ||
vue: mpvueRuntime, | ||
compiler: mpvueCompiler, | ||
megalo: false, | ||
@@ -51,4 +59,4 @@ subPackages: true, | ||
}, | ||
vue: '@dcloudio/vue-cli-plugin-uni/packages/megalo', | ||
compiler: '@megalo/template-compiler', | ||
vue: megaloRuntime, | ||
compiler: megaloCompiler, | ||
megalo: 'swan', | ||
@@ -67,4 +75,4 @@ subPackages: true, | ||
}, | ||
vue: '@dcloudio/vue-cli-plugin-uni/packages/megalo', | ||
compiler: '@megalo/template-compiler', | ||
vue: megaloRuntime, | ||
compiler: megaloCompiler, | ||
megalo: 'alipay', | ||
@@ -83,4 +91,4 @@ subPackages: false, | ||
}, | ||
vue: '@dcloudio/vue-cli-plugin-uni/packages/megalo', | ||
compiler: '@megalo/template-compiler', | ||
vue: megaloRuntime, | ||
compiler: megaloCompiler, | ||
megalo: 'tt', | ||
@@ -168,5 +176,11 @@ subPackages: false, | ||
getPlatformVue () { | ||
if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_USING_COMPONENTS) { | ||
return uniRuntime | ||
} | ||
return platform.vue | ||
}, | ||
getPlatformCompiler () { | ||
if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_USING_COMPONENTS) { | ||
return require(uniCompiler) | ||
} | ||
return require(platform.compiler) | ||
@@ -173,0 +187,0 @@ }, |
@@ -111,3 +111,9 @@ const path = require('path') | ||
normalizePath, | ||
convertStaticStyle | ||
convertStaticStyle, | ||
getComponentName: cached((str) => { | ||
if (str.indexOf('wx-') === 0) { | ||
return str.replace('wx-', 'weixin-') | ||
} | ||
return str | ||
}) | ||
} |
{ | ||
"name": "@dcloudio/uni-cli-shared", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "uni-cli-shared", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36903
11
851
29