You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
336 B
23 lines
336 B
8 years ago
|
/* eslint-disable no-var */
|
||
|
|
||
|
// Native
|
||
|
var path = require('path')
|
||
|
var fs = require('fs')
|
||
|
|
||
|
var dist = path.join(__dirname, 'dist')
|
||
|
var download = path.join(dist, 'download.js')
|
||
|
|
||
|
try {
|
||
|
fs.mkdirSync(dist)
|
||
|
} catch (err) {
|
||
|
if (err.code !== 'EEXIST') {
|
||
|
throw err
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fs.closeSync(
|
||
|
fs.openSync(download, 'a')
|
||
|
)
|
||
|
|
||
|
require(download)
|