File tree 3 files changed +20
-2
lines changed 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,20 @@ var getScriptPageTasks = function(options) {
73
73
}
74
74
}
75
75
76
+ // Show licensings of the script
77
+ if ( script . meta . license ) {
78
+ if ( typeof script . meta . license === 'string' ) {
79
+ options . script . meta . licenses = [ { name : script . meta . license } ] ;
80
+ } else {
81
+ options . script . meta . licenses = [ ] ;
82
+ script . meta . license . forEach ( function ( license ) {
83
+ options . script . meta . licenses . push ( { name : license } ) ;
84
+ } ) ;
85
+ }
86
+ } else {
87
+ option . script . meta . licenses = [ { name : 'MIT License (Expat)' } ] ;
88
+ }
89
+
76
90
// Show the groups the script belongs to
77
91
tasks . push ( function ( callback ) {
78
92
script . hasGroups = false ;
Original file line number Diff line number Diff line change @@ -119,6 +119,11 @@ function parseMeta(aString) {
119
119
lineMatches = lines [ line ] . replace ( / \s + $ / , '' ) . match ( re ) ;
120
120
name = lineMatches [ 1 ] ;
121
121
value = lineMatches [ 2 ] ;
122
+ switch ( name ) {
123
+ case "licence" :
124
+ name = "license" ;
125
+ break ;
126
+ }
122
127
if ( ! headers [ name ] || unique [ name ] ) {
123
128
headers [ name ] = value || '' ;
124
129
} else {
Original file line number Diff line number Diff line change 37
37
{{/script.hasGroups}}
38
38
{{#script.meta.homepage}}< p > < i class ="fa fa-fw fa-home "> </ i > < b > Homepage:</ b > < a href ="{{meta.homepage}} "> {{script.meta.homepage}}</ a > </ p > {{/script.meta.homepage}}
39
39
{{#script.meta.copyright}}< p > < i class ="fa fa-fw fa-legal "> </ i > < b > Copyright:</ b > {{script.meta.copyright}}</ p > {{/script.meta.copyright}}
40
- {{#script.meta.license}}< p > < i class ="fa fa-fw fa-legal "> </ i > < b > License:</ b > {{script.meta.license}}</ p > {{/script.meta.license}}
41
- {{#script.meta.licence}}< p > < i class ="fa fa-fw fa-legal "> </ i > < b > Licence:</ b > {{script.meta.licence}}</ p > {{/script.meta.licence}}
40
+ {{#script.meta.licenses}}< p > < i class ="fa fa-fw fa-legal "> </ i > < b > License:</ b > {{.}}</ p > {{/script.meta.licenses}}
42
41
{{#script.meta.collaborator}}< p > < i class ="fa fa-fw fa-user "> </ i > < b > Collaborator:</ b > {{.}}</ p > {{/script.meta.collaborator}}
43
42
{{#script.fork}}
44
43
< p > < b > Fork History:</ b > </ p >
You can’t perform that action at this time.
0 commit comments