sourcebit-source-filesystem
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "sourcebit-source-filesystem", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Sourcebit filesystem source plugin", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -96,3 +96,5 @@ const chokidar = require('chokidar'); | ||
} | ||
return _.assign({}, data, { objects }); | ||
return _.assign({}, data, { | ||
objects: data.objects.concat(objects) | ||
}); | ||
}; | ||
@@ -99,0 +101,0 @@ |
@@ -108,3 +108,3 @@ const path = require('path'); | ||
modelLabel: _.get(model, 'label', null), | ||
url: model.type === 'page' ? urlFromFilePath(filePath) : null | ||
urlPath: model.type === 'page' ? urlPathFromFilePath(filePath) : null | ||
}, _.isNil) | ||
@@ -167,3 +167,3 @@ ) | ||
function urlFromFilePath(filePath) { | ||
function urlPathFromFilePath(filePath) { | ||
const pathObject = path.parse(filePath); | ||
@@ -174,4 +174,4 @@ const parts = _.compact(pathObject.dir.split(path.sep)); | ||
} | ||
const url = parts.join('/').toLowerCase(); | ||
return '/' + url + (url ? '/' : ''); | ||
const urlPath = parts.join('/').toLowerCase(); | ||
return '/' + urlPath + (urlPath ? '/' : ''); | ||
} | ||
@@ -178,0 +178,0 @@ |
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
15701
300