mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-12 14:54:57 +00:00
183d9a05b5
* build(@embark/stack/blockchain-client): remove unneeded typescript related scripts and deps In addition to being unneeded their presence is causing build errors. * build(embark): remove unneeded typescript related scripts and deps In addition to being unneeded their presence is causing build errors. * build(@embark/plugins/ethereum-blockchain-client): remove unneeded typescript related scripts, deps In addition to being unneeded their presence is causing build errors. * build(@embark/plugins/ganache): remove unneeded typescript related scripts and deps In addition to being unneeded their presence is causing build errors. * build(@embark/plugins/geth): remove unneeded typescript related scripts and deps In addition to being unneeded their presence is causing build errors. * fix(@embark/plugins/transaction-logger): require 'web3' not 'Web3' * fix(@embark/utils/solo): spawn npm(.cmd) instead of npx(.cmd) * test(@embark/plugins/basic-pipeline): add test stub * test(@embark/stack/blockchain): add test stub
31 lines
874 B
JavaScript
31 lines
874 B
JavaScript
/* global __dirname module process require */
|
|
|
|
const {spawn} = require('child_process');
|
|
const {sync: findUp} = require('find-up');
|
|
const {readJsonSync, realpathSync} = require('fs-extra');
|
|
const {join} = require('path');
|
|
|
|
module.exports = function (cliArgs) {
|
|
process.env.EMBARK_SOLO='t';
|
|
|
|
const pkgName = readJsonSync(findUp('package.json')).name;
|
|
|
|
const options = {
|
|
scope: pkgName
|
|
};
|
|
|
|
process.env.EMBARK_COLLECTIVE_OPTIONS = JSON.stringify(options);
|
|
|
|
const embarkCollectivePath = realpathSync(findUp(
|
|
'node_modules/embark-collective', {cwd: __dirname, type: 'directory'}
|
|
));
|
|
|
|
const embarkCollectivePkgJson = readJsonSync(
|
|
join(embarkCollectivePath, 'package.json')
|
|
);
|
|
|
|
const npmCmd = process.platform === 'win32' ? 'npm.cmd': 'npm';
|
|
process.chdir(embarkCollectivePath);
|
|
spawn(npmCmd, ['run', '--', ...cliArgs], {stdio: 'inherit'});
|
|
};
|