File tree 3 files changed +5
-6
lines changed 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Object.keys(mime).forEach(function (type) {
10
10
} )
11
11
12
12
// add the mime extensions from Apache
13
- var mime = require ( '../src/mime .json' )
13
+ var mime = require ( '../src/apache .json' )
14
14
Object . keys ( mime ) . forEach ( function ( type ) {
15
15
var d = mime [ type ]
16
16
var t = type . toLowerCase ( )
Original file line number Diff line number Diff line change 5
5
6
6
var co = require ( 'co' )
7
7
var fs = require ( 'fs' )
8
- var path = require ( 'path' )
9
8
var cogent = require ( 'cogent' )
10
9
var writedb = require ( './lib/write-db' )
11
10
12
11
co ( function * ( ) {
13
12
yield [
14
- get ( 'http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types' ) ,
15
- get ( 'https://raw.githubusercontent.com/broofa/node-mime/master/types/node.types' )
13
+ get ( 'apache' , ' http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types') ,
14
+ get ( 'node' , ' https://raw.githubusercontent.com/broofa/node-mime/master/types/node.types')
16
15
]
17
16
} ) ( )
18
17
19
- function * get ( url ) {
18
+ function * get ( name , url ) {
20
19
var res = yield * cogent ( url , {
21
20
string : true
22
21
} )
@@ -54,5 +53,5 @@ function* get(url) {
54
53
var o = json [ mime ] = { }
55
54
if ( extensions . length ) o . extensions = extensions
56
55
} )
57
- writedb ( 'src/' + path . basename ( url ) . split ( '.' ) [ 0 ] + '.json' , json )
56
+ writedb ( 'src/' + name + '.json' , json )
58
57
}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments