chore(docs): add getComponentPath helper service

This commit is contained in:
Peter Bacon Darwin
2014-11-22 18:02:44 +00:00
parent 7812dfcee8
commit ef114ce6ec
2 changed files with 14 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ module.exports = new Package('angularjs', [
.factory(require('./services/errorNamespaceMap'))
.factory(require('./services/getMinerrInfo'))
.factory(require('./services/getVersion'))
.factory(require('./services/getComponentPath'))
.factory(require('./services/gitData'))
.factory(require('./services/deployments/debug'))

View File

@@ -0,0 +1,13 @@
"use strict";
/**
* dgService getVersion
* @description
* Find the current version of the bower component (or npm module)
*/
module.exports = function getComponentPath(getVersion) {
return function(component, item, sourceFolder, packageFile) {
item = item || component + '.js';
return 'components/' + component + '-' + getVersion(component, sourceFolder, packageFile) + '/' + item;
};
};