mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-11 19:01:43 +08:00
Add encoding/hash signature to JS files
Reviewed By: tadeuzagallo Differential Revision: D3241028 fb-gh-sync-id: 737ae64cf3a3f4f121076dbfe933d5fe71e07817 fbshipit-source-id: 737ae64cf3a3f4f121076dbfe933d5fe71e07817
This commit is contained in:
committed by
Facebook Github Bot 9
parent
8d3d8b3440
commit
34dd17cae5
@@ -9,7 +9,7 @@
|
||||
'use strict';
|
||||
|
||||
const Promise = require('promise');
|
||||
const sign = require('../sign');
|
||||
const hash = require('./hash');
|
||||
const writeFile = require('./writeFile');
|
||||
|
||||
function buildBundle(packagerClient, requestOptions) {
|
||||
@@ -36,7 +36,9 @@ function saveBundleAndMap(bundle, options, log) {
|
||||
log('finish');
|
||||
|
||||
log('Writing bundle output to:', bundleOutput);
|
||||
const writeBundle = writeFile(bundleOutput, sign(codeWithMap.code), encoding);
|
||||
|
||||
const code = hash.appendToString(codeWithMap.code, encoding);
|
||||
const writeBundle = writeFile(bundleOutput, code, encoding);
|
||||
writeBundle.then(() => log('Done writing bundle output'));
|
||||
|
||||
if (sourcemapOutput) {
|
||||
|
||||
Reference in New Issue
Block a user