ethers.js/tests/Gruntfile.js
2017-10-22 17:47:17 -04:00

34 lines
731 B
JavaScript

'use strict';
var fs = require('fs');
// Create a mock-fs module that can load our gzipped test cases
var data = {};
fs.readdirSync('tests').forEach(function(filename) {
filename = 'tests/' + filename;
data['/' + filename] = fs.readFileSync(filename).toString('base64');
});
fs.writeFileSync('./dist/tests.json', JSON.stringify(data));
module.exports = function(grunt) {
grunt.initConfig({
browserify: {
dist: {
files: {
'dist/tests.js': './browser.js',
},
options: {
browserifyOptions: {
standalone: 'tests',
},
},
},
},
});
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('dist', ['browserify']);
};