-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinjectVersion.js
17 lines (14 loc) · 1.1 KB
/
injectVersion.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// import { readFileSync, writeFileSync } from 'fs';
// // Reads dist/node/common/util.js and replaces PACKAGE_JSON_VERSION with the number from the package.json
// import { version } from './package.json';
// const baseUtil = readFileSync('./dist/node/common/util.js', 'utf8');
// const newBaseUtil = baseUtil.replace(/PACKAGE_JSON_VERSION/g, version);
// writeFileSync('./dist/node/common/util.js', newBaseUtil);
// // Reads dist/browser/common/util.js and replaces PACKAGE_JSON_VERSION with the number from the package.json
// const baseUtilBrowser = readFileSync('./dist/browser/common/util.js', 'utf8');
// const newBaseUtilBrowser = baseUtilBrowser.replace(/PACKAGE_JSON_VERSION/g, version);
// writeFileSync('./dist/browser/common/util.js', newBaseUtilBrowser);