Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7221a2

Browse files
committed
build: rename mime.json to apache.json
1 parent 83d7728 commit f7221a2

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Object.keys(mime).forEach(function (type) {
1010
})
1111

1212
// add the mime extensions from Apache
13-
var mime = require('../src/mime.json')
13+
var mime = require('../src/apache.json')
1414
Object.keys(mime).forEach(function (type) {
1515
var d = mime[type]
1616
var t = type.toLowerCase()

scripts/extensions.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@
55

66
var co = require('co')
77
var fs = require('fs')
8-
var path = require('path')
98
var cogent = require('cogent')
109
var writedb = require('./lib/write-db')
1110

1211
co(function* () {
1312
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')
1615
]
1716
})()
1817

19-
function* get(url) {
18+
function* get(name, url) {
2019
var res = yield* cogent(url, {
2120
string: true
2221
})
@@ -54,5 +53,5 @@ function* get(url) {
5453
var o = json[mime] = {}
5554
if (extensions.length) o.extensions = extensions
5655
})
57-
writedb('src/' + path.basename(url).split('.')[0] + '.json', json)
56+
writedb('src/' + name + '.json', json)
5857
}
File renamed without changes.

0 commit comments

Comments
 (0)