Skip to content

Commit 05aef26

Browse files
Jean Lauliacfacebook-github-bot
authored andcommitted
packager: enable @flow in bundle/buildBundle.js
Reviewed By: cpojer Differential Revision: D4377362 fbshipit-source-id: decd5ff9b245c9dfd4bb9af6e41717ee860fc1ba
1 parent 21e8d2a commit 05aef26

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

local-cli/bundle/buildBundle.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
* This source code is licensed under the BSD-style license found in the
66
* LICENSE file in the root directory of this source tree. An additional grant
77
* of patent rights can be found in the PATENTS file in the same directory.
8+
*
9+
* @flow
810
*/
11+
912
'use strict';
1013

1114
const log = require('../util/log').out('bundle');
@@ -17,15 +20,26 @@ const path = require('path');
1720
const saveAssets = require('./saveAssets');
1821
const defaultAssetExts = require('../../packager/defaults').assetExts;
1922

20-
import type RequestOptions from './types.flow';
23+
import type {RequestOptions, OutputOptions} from './types.flow';
24+
import type {ConfigT} from '../util/Config';
2125

2226
function saveBundle(output, bundle, args) {
2327
return Promise.resolve(
2428
output.save(bundle, args, log)
2529
).then(() => bundle);
2630
}
2731

28-
function buildBundle(args, config, output = outputBundle, packagerInstance) {
32+
function buildBundle(
33+
args: OutputOptions & {
34+
assetsDest: mixed,
35+
entryFile: string,
36+
resetCache: boolean,
37+
transformer: string,
38+
},
39+
config: ConfigT,
40+
output = outputBundle,
41+
packagerInstance,
42+
) {
2943
// This is used by a bazillion of npm modules we don't control so we don't
3044
// have other choice than defining it as an env variable here.
3145
process.env.NODE_ENV = args.dev ? 'development' : 'production';

0 commit comments

Comments
 (0)