All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.test.build-tape.js Maven / Gradle / Ivy

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();
                });
            });
    });
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy