git ssb

0+

cel-desktop / ssb-pkg



Tree: 4c58f1c6c3ddb86a97f27f0c84681d201ef1f75f

Files: 4c58f1c6c3ddb86a97f27f0c84681d201ef1f75f / test / test-50-package-json-6b / main.js

706 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5const path = require('path');
6const assert = require('assert');
7const utils = require('../utils.js');
8
9assert(!module.parent);
10assert(__dirname === process.cwd());
11
12const target = process.argv[2] || 'host';
13const input = './node_modules/alpha/alpha.js';
14const output = './test-output.exe';
15
16let left, right;
17utils.mkdirp.sync(path.dirname(output));
18
19left = utils.spawn.sync(
20 'node', [ path.basename(input) ],
21 { cwd: path.dirname(input) }
22);
23
24utils.pkg.sync([
25 '--target', target,
26 '--output', output, input
27]);
28
29right = utils.spawn.sync(
30 './' + path.basename(output), [],
31 { cwd: path.dirname(output) }
32);
33
34assert.equal(left, right);
35utils.vacuum.sync(output);
36

Built with git-ssb-web