@@ -9,6 +9,12 @@ module.exports = function(config) {
9
9
var version = gruntUtils . getVersion ( ) ;
10
10
var cdnUrl = "//ajax.googleapis.com/ajax/libs/angularjs/" + version . cdn ;
11
11
12
+ var getVersion = function ( component , sourceFolder , packageFile ) {
13
+ sourceFolder = sourceFolder || '../bower_components' ;
14
+ packageFile = packageFile || 'bower.json' ;
15
+ return require ( path . join ( sourceFolder , component , packageFile ) ) . version ;
16
+ } ;
17
+
12
18
13
19
config = basePackage ( config ) ;
14
20
@@ -38,20 +44,20 @@ module.exports = function(config) {
38
44
'../angular-sanitize.js' ,
39
45
'../angular-touch.js' ,
40
46
'../angular-animate.js' ,
41
- 'components/marked/lib/marked.js' ,
47
+ 'components/marked-' + getVersion ( 'marked' , '../node_modules' , 'package.json' ) + ' /lib/marked.js',
42
48
'js/angular-bootstrap/bootstrap.js' ,
43
49
'js/angular-bootstrap/bootstrap-prettify.js' ,
44
50
'js/angular-bootstrap/dropdown-toggle.js' ,
45
- 'components/lunr.js/lunr.js' ,
46
- 'components/google-code-prettify/src/prettify.js' ,
47
- 'components/google-code-prettify/src/lang-css.js' ,
51
+ 'components/lunr.js-' + getVersion ( 'lunr.js' ) + ' /lunr.js',
52
+ 'components/google-code-prettify-' + getVersion ( 'google-code-prettify' ) + ' /src/prettify.js',
53
+ 'components/google-code-prettify-' + getVersion ( 'google-code-prettify' ) + ' /src/lang-css.js',
48
54
'js/versions-data.js' ,
49
55
'js/pages-data.js' ,
50
56
'js/docs.js'
51
57
] ,
52
58
stylesheets : [
53
- 'css /bootstrap/css/bootstrap.css' ,
54
- 'components/open-sans-fontface/open-sans.css' ,
59
+ 'components /bootstrap-' + getVersion ( 'bootstrap' ) + '/dist /css/bootstrap.css',
60
+ 'components/open-sans-fontface-' + getVersion ( 'open-sans-fontface' ) + ' /open-sans.css',
55
61
'css/prettify-theme.css' ,
56
62
'css/docs.css' ,
57
63
'css/animations.css'
@@ -67,20 +73,20 @@ module.exports = function(config) {
67
73
'../angular-sanitize.min.js' ,
68
74
'../angular-touch.min.js' ,
69
75
'../angular-animate.min.js' ,
70
- 'components/marked/lib/marked.js' ,
76
+ 'components/marked-' + getVersion ( 'marked' , '../node_modules' , 'package.json' ) + ' /lib/marked.js',
71
77
'js/angular-bootstrap/bootstrap.js' ,
72
78
'js/angular-bootstrap/bootstrap-prettify.js' ,
73
79
'js/angular-bootstrap/dropdown-toggle.js' ,
74
- 'components/lunr.js/lunr.min.js' ,
75
- 'components/google-code-prettify/src/prettify.js' ,
76
- 'components/google-code-prettify/src/lang-css.js' ,
80
+ 'components/lunr.js-' + getVersion ( 'lunr.js' ) + ' /lunr.min.js',
81
+ 'components/google-code-prettify-' + getVersion ( 'google-code-prettify' ) + ' /src/prettify.js',
82
+ 'components/google-code-prettify-' + getVersion ( 'google-code-prettify' ) + ' /src/lang-css.js',
77
83
'js/versions-data.js' ,
78
84
'js/pages-data.js' ,
79
85
'js/docs.js'
80
86
] ,
81
87
stylesheets : [
82
- 'components/bootstrap/dist/css/bootstrap.css' ,
83
- 'components/open-sans-fontface/open-sans.css' ,
88
+ 'components/bootstrap-' + getVersion ( 'bootstrap' ) + ' /dist/css/bootstrap.min .css',
89
+ 'components/open-sans-fontface-' + getVersion ( 'open-sans-fontface' ) + ' /open-sans.css',
84
90
'css/prettify-theme.css' ,
85
91
'css/docs.css' ,
86
92
'css/animations.css'
@@ -96,20 +102,20 @@ module.exports = function(config) {
96
102
cdnUrl + '/angular-sanitize.min.js' ,
97
103
cdnUrl + '/angular-touch.min.js' ,
98
104
cdnUrl + '/angular-animate.min.js' ,
99
- 'components/marked/lib/marked.js' ,
105
+ 'components/marked-' + getVersion ( 'marked' , '../node_modules' , 'package.json' ) + ' /lib/marked.js',
100
106
'js/angular-bootstrap/bootstrap.js' ,
101
107
'js/angular-bootstrap/bootstrap-prettify.js' ,
102
108
'js/angular-bootstrap/dropdown-toggle.js' ,
103
- 'components/lunr.js/lunr.min.js' ,
104
- 'components/google-code-prettify/src/prettify.js' ,
105
- 'components/google-code-prettify/src/lang-css.js' ,
109
+ 'components/lunr.js-' + getVersion ( 'lunr.js' ) + ' /lunr.min.js',
110
+ 'components/google-code-prettify-' + getVersion ( 'google-code-prettify' ) + ' /src/prettify.js',
111
+ 'components/google-code-prettify-' + getVersion ( 'google-code-prettify' ) + ' /src/lang-css.js',
106
112
'js/versions-data.js' ,
107
113
'js/pages-data.js' ,
108
114
'js/docs.js'
109
115
] ,
110
116
stylesheets : [
111
- 'components/bootstrap/dist/css/bootstrap.css' ,
112
- 'components/open-sans-fontface/open-sans.css' ,
117
+ 'components/bootstrap-' + getVersion ( 'bootstrap' ) + ' /dist/css/bootstrap.min .css',
118
+ 'components/open-sans-fontface-' + getVersion ( 'open-sans-fontface' ) + ' /open-sans.css',
113
119
'css/prettify-theme.css' ,
114
120
'css/docs.css' ,
115
121
'css/animations.css'
0 commit comments