Skip to content

Update build script & Correct browser package #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions scripts/build-and-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ set -e

SCRIPT_DIR=$(dirname $(readlink -f $0))
PROJECT_BASE_DIR=$(dirname $SCRIPT_DIR)
NPMRC_FILE="$PROJECT_BASE_DIR/.npmrc"
SDK_DIR="$PROJECT_BASE_DIR/sdk"

PACKAGE="feature-management"
PACKAGE_DIR="$SDK_DIR/$PACKAGE"

if [ -f "$NPMRC_FILE" ]; then
echo "Copy .npmrc file to $PACKAGE_DIR"
cp "$NPMRC_FILE" "$PACKAGE_DIR"
fi

echo "Building package $PACKAGE in $PACKAGE_DIR"
cd "$PACKAGE_DIR"

Expand All @@ -31,6 +37,11 @@ cp "$PACKAGE_DIR"/*.tgz "$PROJECT_BASE_DIR"
PACKAGE="feature-management-applicationinsights-browser"
PACKAGE_DIR="$SDK_DIR/$PACKAGE"

if [ -f "$NPMRC_FILE" ]; then
echo "Copy .npmrc file to $PACKAGE_DIR"
cp "$NPMRC_FILE" "$PACKAGE_DIR"
fi

echo "Building package $PACKAGE in $PACKAGE_DIR"
cd "$PACKAGE_DIR"

Expand All @@ -46,6 +57,11 @@ cp "$PACKAGE_DIR"/*.tgz "$PROJECT_BASE_DIR"
PACKAGE="feature-management-applicationinsights-node"
PACKAGE_DIR="$SDK_DIR/$PACKAGE"

if [ -f "$NPMRC_FILE" ]; then
echo "Copy .npmrc file to $PACKAGE_DIR"
cp "$NPMRC_FILE" "$PACKAGE_DIR"
fi

echo "Building package $PACKAGE in $PACKAGE_DIR"
cd "$PACKAGE_DIR"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"name": "@microsoft/feature-management-applicationinsights-browser",
"version": "2.0.0",
"description": "Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation events produced by the Feature Management library.",
"main": "./dist/umd/index.js",
"main": "./dist/esm/index.js",
"module": "./dist/esm/index.js",
"type": "module",
"types": "types/index.d.ts",
"files": [
"dist/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ export default [
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "esm" }],
plugins: [dts()],
},
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ export default [
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "esm" }],
plugins: [dts()],
},
}
];
Loading