1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 04:46:10 +01:00
metamask-extension/mascara/test/index.js

23 lines
483 B
JavaScript
Raw Normal View History

2017-04-27 15:25:00 +02:00
var fs = require('fs')
var path = require('path')
2018-07-03 00:49:33 +02:00
var browserify = require('browserify')
2017-04-27 15:25:00 +02:00
var tests = fs.readdirSync(path.join(__dirname, 'lib'))
var bundlePath = path.join(__dirname, 'test-bundle.js')
2018-07-03 00:49:33 +02:00
var b = browserify()
2017-04-27 15:25:00 +02:00
// Remove old bundle
try {
fs.unlinkSync(bundlePath)
2017-04-28 21:19:14 +02:00
} catch (e) {
console.error(e)
}
2017-04-27 15:25:00 +02:00
var writeStream = fs.createWriteStream(bundlePath)
2018-07-03 00:49:33 +02:00
tests.forEach(function (fileName) {
2017-04-27 15:25:00 +02:00
b.add(path.join(__dirname, 'lib', fileName))
})
2018-07-03 00:49:33 +02:00
b.bundle().pipe(writeStream)
2017-04-27 15:25:00 +02:00