mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 21:00:13 +01:00
20 lines
441 B
JavaScript
20 lines
441 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
const browserify = require('browserify')
|
|
const tests = fs.readdirSync(path.join(__dirname, 'lib'))
|
|
const bundlePath = path.join(__dirname, 'bundle.js')
|
|
|
|
const b = browserify()
|
|
|
|
const writeStream = fs.createWriteStream(bundlePath)
|
|
|
|
tests.forEach(function (fileName) {
|
|
b.add(path.join(__dirname, 'lib', fileName))
|
|
})
|
|
|
|
b.bundle()
|
|
.pipe(writeStream)
|
|
.on('error', (err) => {
|
|
throw err
|
|
})
|