-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust test manual e2e script to work with new init (#24583)
Summary: Since initialisation flow changed with default template, we need to adjust the script to make it work properly. [General] [Fixed] - Adjust text manual e2e script to work with new init. Pull Request resolved: #24583 Differential Revision: D15062374 Pulled By: cpojer fbshipit-source-id: 8110597b27056570784439362f12963154460613
- Loading branch information
1 parent
c87de76
commit 421ffb0
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const version = process.argv[2]; | ||
|
||
if (!version) { | ||
console.error('Please provide a react-native version.'); | ||
process.exit(1); | ||
} | ||
|
||
const jsonPath = path.join(__dirname, '../template/package.json'); | ||
|
||
let templatePackageJson = require(jsonPath); | ||
templatePackageJson.dependencies['react-native'] = version; | ||
fs.writeFileSync( | ||
jsonPath, | ||
JSON.stringify(templatePackageJson, null, 2) + '\n', | ||
'utf-8', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters