Skip to content

Commit ef114ce

Browse files
chore(docs): add getComponentPath helper service
1 parent 7812dfc commit ef114ce

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/config/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = new Package('angularjs', [
1717
.factory(require('./services/errorNamespaceMap'))
1818
.factory(require('./services/getMinerrInfo'))
1919
.factory(require('./services/getVersion'))
20+
.factory(require('./services/getComponentPath'))
2021
.factory(require('./services/gitData'))
2122

2223
.factory(require('./services/deployments/debug'))
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"use strict";
2+
3+
/**
4+
* dgService getVersion
5+
* @description
6+
* Find the current version of the bower component (or npm module)
7+
*/
8+
module.exports = function getComponentPath(getVersion) {
9+
return function(component, item, sourceFolder, packageFile) {
10+
item = item || component + '.js';
11+
return 'components/' + component + '-' + getVersion(component, sourceFolder, packageFile) + '/' + item;
12+
};
13+
};

0 commit comments

Comments
 (0)