Skip to content

Commit

Permalink
Merge pull request #119 from microsoft/lramos15/clinical-sailfish
Browse files Browse the repository at this point in the history
Switch to no bundling and let extensions decide how they would like to bundle
  • Loading branch information
lramos15 committed Sep 8, 2022
2 parents 5d77857 + 84455cb commit 04e50fb
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 630 deletions.
51 changes: 0 additions & 51 deletions .esbuild.config.js

This file was deleted.

11 changes: 8 additions & 3 deletions .gitignore
Expand Up @@ -9,8 +9,13 @@ npm-debug.log

# sourcemaps
src/**/*.js.map
lib/**/*.js.map
lib/**/*.js

# dist
dist/**/*
!dist/**/*.d.ts

# Packaged node modules
*.tgz
*.tgz

# Extracted npm modules
package
5 changes: 1 addition & 4 deletions .npmignore
@@ -1,10 +1,6 @@
.vscode
build
.github
lib/*.js.map
lib/*.js
lib/test
!lib/*.min.js
node_modules
src
typings_patches
Expand All @@ -16,4 +12,5 @@ tsfmt.json
.esbuild.config.js
.eslintrc.json
.eslintignore
*.tgz
*.test.ts
File renamed without changes.
17 changes: 17 additions & 0 deletions injectVersion.js
@@ -0,0 +1,17 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

const fs = require('fs');

// Reads dist/node/common/baseTelemetryReporter.js and replaces PACKAGE_JSON_VERSION with the number from the package.json
const packageJson = require('./package.json');
const baseTelemetryReporter = fs.readFileSync('./dist/node/common/baseTelemetryReporter.js', 'utf8');
const newBaseTelemetryReporter = baseTelemetryReporter.replace(/PACKAGE_JSON_VERSION/g, packageJson.version);
fs.writeFileSync('./dist/node/common/baseTelemetryReporter.js', newBaseTelemetryReporter);

// Reads dist/browser/common/baseTelemetryReporter.js and replaces PACKAGE_JSON_VERSION with the number from the package.json
const baseTelemetryReporterBrowser = fs.readFileSync('./dist/browser/common/baseTelemetryReporter.js', 'utf8');
const newBaseTelemetryReporterBrowser = baseTelemetryReporterBrowser.replace(/PACKAGE_JSON_VERSION/g, packageJson.version);
fs.writeFileSync('./dist/browser/common/baseTelemetryReporter.js', newBaseTelemetryReporterBrowser);

0 comments on commit 04e50fb

Please sign in to comment.