mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-01 12:33:37 +08:00
chore(docs): add getComponentPath helper service
This commit is contained in:
@@ -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'))
|
||||
|
||||
13
docs/config/services/getComponentPath.js
Normal file
13
docs/config/services/getComponentPath.js
Normal 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;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user