@antora/content-classifier
Advanced tools
Comparing version 3.0.0-alpha.6 to 3.0.0-alpha.7
@@ -46,6 +46,8 @@ 'use strict' | ||
function allocateSrc (file, component, version, nav) { | ||
const extname = file.src.extname | ||
const filepath = file.path | ||
const navInfo = nav && getNavInfo(filepath, nav) | ||
const pathSegments = filepath.split('/') | ||
const navInfo = nav && getNavInfo(filepath, nav) | ||
if (navInfo) { | ||
if (extname !== '.adoc') return // ignore file | ||
file.nav = navInfo | ||
@@ -71,3 +73,3 @@ file.src.family = 'nav' | ||
file.src.relative = pathSegments.slice(4).join('/') | ||
} else if (file.src.extname === '.adoc') { | ||
} else if (extname === '.adoc') { | ||
file.src.family = 'page' | ||
@@ -77,4 +79,3 @@ // relative to modules/<module>/pages | ||
} else { | ||
// ignore file | ||
return | ||
return // ignore file | ||
} | ||
@@ -86,2 +87,3 @@ break | ||
case 'images': | ||
if (!extname) return // ignore file | ||
file.src.family = familyFolder.substr(0, familyFolder.length - 1) | ||
@@ -92,9 +94,13 @@ // relative to modules/<module>/assets/<family>s | ||
default: | ||
// ignore file | ||
return | ||
return // ignore file | ||
} | ||
break | ||
case 'attachments': | ||
case 'images': | ||
if (!extname) return | ||
file.src.family = familyFolder.substr(0, familyFolder.length - 1) | ||
// relative to modules/<module>/<family>s | ||
file.src.relative = pathSegments.slice(3).join('/') | ||
break | ||
case 'examples': | ||
case 'images': | ||
case 'partials': | ||
@@ -106,4 +112,3 @@ file.src.family = familyFolder.substr(0, familyFolder.length - 1) | ||
default: | ||
// ignore file | ||
return | ||
return // ignore file | ||
} | ||
@@ -113,4 +118,3 @@ file.src.module = pathSegments[1] | ||
} else { | ||
// ignore file | ||
return | ||
return // ignore file | ||
} | ||
@@ -117,0 +121,0 @@ file.src.component = component |
@@ -62,3 +62,3 @@ 'use strict' | ||
componentVersion.prerelease = prerelease | ||
if (!displayVersion && (typeof prerelease === 'string' || prerelease instanceof String)) { | ||
if (!displayVersion && prerelease.constructor === String) { | ||
if (version) { | ||
@@ -65,0 +65,0 @@ const ch0 = prerelease.charAt() |
{ | ||
"name": "@antora/content-classifier", | ||
"version": "3.0.0-alpha.6", | ||
"version": "3.0.0-alpha.7", | ||
"description": "Organizes aggregated content into a virtual file catalog for use in an Antora documentation pipeline.", | ||
@@ -19,3 +19,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/logger": "3.0.0-alpha.6", | ||
"@antora/logger": "3.0.0-alpha.7", | ||
"mime-types": "~2.1", | ||
@@ -38,3 +38,3 @@ "vinyl": "~2.2" | ||
], | ||
"gitHead": "38ec002e88eede3ce5c401a6e226d1a0356945c5" | ||
"gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0" | ||
} |
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
55849
900
+ Added@antora/expand-path-helper@1.0.0(transitive)
+ Added@antora/logger@3.0.0-alpha.7(transitive)
+ Addedjoycon@3.1.1(transitive)
+ Addedpino-pretty@5.1.3(transitive)
- Removed@antora/logger@3.0.0-alpha.6(transitive)
- Removedjoycon@2.2.5(transitive)
- Removedpino-pretty@4.8.0(transitive)
Updated@antora/logger@3.0.0-alpha.7