Move formatBanner to metro-core

Reviewed By: rafeca

Differential Revision: D6555773

fbshipit-source-id: 9d10a3d03c88eeaa2d6845518da3dacab8b556b0
This commit is contained in:
Peter van der Zee 2017-12-15 06:21:11 -08:00 committed by Facebook Github Bot
parent a96e99fae5
commit 9485a37fe0
4 changed files with 28 additions and 2 deletions

View File

@ -6,6 +6,7 @@
* 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.
*
* Note: This file runs BEFORE transforms so DO NOT ADD ES6 or Flow in code!
* @format
*/
@ -44,6 +45,9 @@ var BOTTOM_RIGHT = '\u2518';
* // Space between the right banner border and the text (default = 2)
* paddingRight: number;
* };
*
* @PrettierFixMe can't use comment-style flow syntax because prettier strips it
* https://github.com/prettier/prettier/issues/204
*/
function formatBanner(message, options) {
options = options || {};

View File

@ -0,0 +1,17 @@
/**
* Copyright (c) 2015-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.
*
* @flow
* @format
*/
'use strict';
const formatBanner = require('./formatBanner');
module.exports = formatBanner;

View File

@ -14,4 +14,9 @@
const Terminal = require('./Terminal');
module.exports = {Terminal};
const formatBanner = require('./formatBanner');
module.exports = {
Terminal,
formatBanner,
};

View File

@ -13,7 +13,6 @@
'use strict';
const chalk = require('chalk');
const formatBanner = require('./formatBanner');
const path = require('path');
const reporting = require('./reporting');
const throttle = require('lodash/throttle');
@ -21,6 +20,7 @@ const throttle = require('lodash/throttle');
const {
AmbiguousModuleResolutionError,
} = require('../node-haste/DependencyGraph/ResolutionRequest');
const {formatBanner} = require('metro-core');
import type {BundleOptions} from '../shared/types.flow';
import type {ReportableEvent, GlobalCacheDisabledReason} from './reporting';