api-gensdk
Advanced tools
Comparing version 0.1.14 to 0.1.15
@@ -77,4 +77,8 @@ "use strict"; | ||
}); | ||
const filePath = path.join(sdkDir, `${config.camelCase ? | ||
util_1.toCamelCase(typeName) : util_1.toHyphenCase(typeName)}.${config.type}`); | ||
let name = config.camelCase ? | ||
util_1.toCamelCase(typeName) : util_1.toHyphenCase(typeName); | ||
if (config.camelCase === 'lower') { | ||
name = `${name[0].toLowerCase()}${name.substr(1)}`; | ||
} | ||
const filePath = path.join(sdkDir, `${name}.${config.type}`); | ||
fs.writeFileSync(filePath, fileContent, { encoding: 'utf8' }); | ||
@@ -81,0 +85,0 @@ console.log('[GenSDK] gen', filePath); |
@@ -31,4 +31,4 @@ export interface RouteMetadataType { | ||
templatePath: string; | ||
/** filename style */ | ||
camelCase?: boolean; | ||
/** filename style, true 为大驼峰,lower 为小驼峰 */ | ||
camelCase?: boolean | 'lower'; | ||
/** gen type */ | ||
@@ -35,0 +35,0 @@ type?: 'ts' | 'js'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
constructor() { | ||
/** filename style */ | ||
/** filename style, true 为大驼峰,lower 为小驼峰 */ | ||
this.camelCase = false; | ||
@@ -8,0 +8,0 @@ /** gen type */ |
{ | ||
"name": "api-gensdk", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "", | ||
@@ -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
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
13506
207