metro/scripts/postinstall.js

19 lines
765 B
JavaScript
Raw Normal View History

2017-01-26 12:56:40 +00:00
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
const path = require('path');
2017-05-22 10:51:24 +00:00
const runCommand = require('./_runCommand');
2017-01-26 12:56:40 +00:00
console.log(`Setting up metro-bundler's development environment...`);
2017-05-22 10:51:24 +00:00
const isWindows = process.platform === 'win32';
2017-01-26 12:56:40 +00:00
const lerna = isWindows ? 'lerna.cmd' : 'lerna';
2017-05-22 10:51:24 +00:00
const lernaCmd = path.resolve(__dirname, '../node_modules/.bin/' + lerna);
const args = process.env.CI ? ['bootstrap', '--concurrency=1'] : ['bootstrap'];
2017-01-26 12:56:40 +00:00
2017-05-22 10:51:24 +00:00
runCommand(lernaCmd, args, path.resolve(__dirname, '..'));