forked from ethers-io/ethers.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile-test.js
More file actions
34 lines (28 loc) · 813 Bytes
/
Gruntfile-test.js
File metadata and controls
34 lines (28 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
var fs = require('fs');
// Create a mock-fs module that can load our gzipped test cases
var data = {};
fs.readdirSync('tests/tests').forEach(function(filename) {
if (!filename.match(/\.json\.gz$/)) { return; }
filename = 'tests/tests/' + filename;
data['/' + filename] = fs.readFileSync(filename).toString('base64');
});
fs.writeFileSync('./tests/dist/tests.json', JSON.stringify(data));
module.exports = function(grunt) {
grunt.initConfig({
browserify: {
dist: {
files: {
'tests/dist/tests.js': './tests/browser.js',
},
options: {
browserifyOptions: {
standalone: 'tests',
},
},
},
},
});
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('dist', ['browserify']);
};