Comparing version 0.0.1-alpha to 0.0.2-alpha
@@ -154,9 +154,10 @@ // src/extract/SnippetExtractor.ts | ||
const language = this.getLanguageFromExtension(extension); | ||
const version = this.config.version || "v1"; | ||
return path.join( | ||
const version = this.config.version; | ||
const outputPathParts = [ | ||
this.config.snippetOutputDirectory, | ||
version, | ||
...version ? [version] : [], | ||
language, | ||
`${snippetName}.snippet.js` | ||
); | ||
]; | ||
return path.join(...outputPathParts); | ||
} | ||
@@ -163,0 +164,0 @@ getLanguageFromExtension(extension) { |
@@ -154,9 +154,10 @@ // src/extract/SnippetExtractor.ts | ||
const language = this.getLanguageFromExtension(extension); | ||
const version = this.config.version || "v1"; | ||
return path.join( | ||
const version = this.config.version; | ||
const outputPathParts = [ | ||
this.config.snippetOutputDirectory, | ||
version, | ||
...version ? [version] : [], | ||
language, | ||
`${snippetName}.snippet.js` | ||
); | ||
]; | ||
return path.join(...outputPathParts); | ||
} | ||
@@ -163,0 +164,0 @@ getLanguageFromExtension(extension) { |
{ | ||
"name": "shnip", | ||
"type": "module", | ||
"version": "0.0.1-alpha", | ||
"version": "0.0.2-alpha", | ||
"description": "A snippet extraction tool for various programming languages.", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
@@ -16,3 +16,3 @@ import path from "path"; | ||
outputDirectoryStructure: string; | ||
version: string; | ||
version?: string; | ||
} | ||
@@ -224,10 +224,12 @@ | ||
const language = this.getLanguageFromExtension(extension); | ||
const version = this.config.version || "v1"; | ||
const version = this.config.version; | ||
return path.join( | ||
const outputPathParts = [ | ||
this.config.snippetOutputDirectory, | ||
version, | ||
...(version ? [version] : []), | ||
language, | ||
`${snippetName}.snippet.js` | ||
); | ||
`${snippetName}.snippet.js`, | ||
]; | ||
return path.join(...outputPathParts); | ||
} | ||
@@ -234,0 +236,0 @@ |
Sorry, the diff of this file is too big to display
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
549613
16403