package.build.test.build-tape.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapbox-gl Show documentation
Show all versions of mapbox-gl Show documentation
A WebGL interactive maps library
The newest version!
/* eslint-disable import/no-commonjs */
/* eslint-disable flowtype/require-valid-file-annotation */
const browserify = require('browserify');
const fs = require('fs');
module.exports = function() {
return new Promise((resolve, reject) => {
browserify(require.resolve('../../test/util/tape_config.js'), { standalone: 'tape' })
.transform("babelify", {presets: ["@babel/preset-env"], global: true})
.bundle((err, buff) => {
if (err) { throw err; }
fs.writeFile('test/integration/dist/tape.js', buff, { encoding: 'utf8'}, (err) => {
if (err) { reject(err); }
resolve();
});
});
});
};