Sha256: 858f3c9ae76c9cd2310650b00e50a8e8dbf5bcae7cece04a3443e0ad2efcb0dc

Contents?: true

Size: 759 Bytes

Versions: 4

Compression:

Stored size: 759 Bytes

Contents

var test = require('tape');
var pack = require('../');

test('raw', function (t) {
    t.plan(1);
    
    var p = pack({ raw: true });
    var src = '';
    p.on('data', function (buf) { src += buf });
    p.on('end', function () {
        var order = [];
        var r = Function(['order'], 'return ' + src)(order);
        t.same(order, [ 'abc', 'def', 'hij' ]);
    });
    
    p.write({
        id: 'def',
        order: 1,
        entry: true,
        source: 'order.push("def")'
    });
    
    p.write({
        id: 'hij',
        entry: true,
        order: 2,
        source: 'order.push("hij")'
    });
    
    p.write({
        id: 'abc',
        entry: true,
        order: 0,
        source: 'order.push("abc")'
    });
    
    p.end();
});

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/browser-pack/test/order.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/browser-pack/test/order.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/browser-pack/test/order.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/browser-pack/test/order.js