|
|
@ -1,18 +1,13 @@ |
|
|
|
var fs = require('fs') |
|
|
|
const fs = require('fs') |
|
|
|
var path = require('path') |
|
|
|
const path = require('path') |
|
|
|
var browserify = require('browserify') |
|
|
|
const browserify = require('browserify') |
|
|
|
var tests = fs.readdirSync(path.join(__dirname, 'lib')) |
|
|
|
const tests = fs.readdirSync(path.join(__dirname, 'lib')) |
|
|
|
var bundlePath = path.join(__dirname, 'bundle.js') |
|
|
|
const bundlePath = path.join(__dirname, 'bundle.js') |
|
|
|
|
|
|
|
|
|
|
|
var b = browserify() |
|
|
|
const b = browserify() |
|
|
|
|
|
|
|
|
|
|
|
// Remove old bundle
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
// if (fs.existsSync(bundlePath)) {
|
|
|
|
const writeStream = fs.createWriteStream(bundlePath) |
|
|
|
// fs.unlinkSync(bundlePath)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var writeStream = fs.createWriteStream(bundlePath) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests.forEach(function (fileName) { |
|
|
|
tests.forEach(function (fileName) { |
|
|
|
b.add(path.join(__dirname, 'lib', fileName)) |
|
|
|
b.add(path.join(__dirname, 'lib', fileName)) |
|
|
|