Skip to content

Commit 6a03ea6

Browse files
update build script & correct browser package (#86)
1 parent 73f971f commit 6a03ea6

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

scripts/build-and-pack.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ set -e
55

66
SCRIPT_DIR=$(dirname $(readlink -f $0))
77
PROJECT_BASE_DIR=$(dirname $SCRIPT_DIR)
8+
NPMRC_FILE="$PROJECT_BASE_DIR/.npmrc"
89
SDK_DIR="$PROJECT_BASE_DIR/sdk"
910

1011
PACKAGE="feature-management"
1112
PACKAGE_DIR="$SDK_DIR/$PACKAGE"
1213

14+
if [ -f "$NPMRC_FILE" ]; then
15+
echo "Copy .npmrc file to $PACKAGE_DIR"
16+
cp "$NPMRC_FILE" "$PACKAGE_DIR"
17+
fi
18+
1319
echo "Building package $PACKAGE in $PACKAGE_DIR"
1420
cd "$PACKAGE_DIR"
1521

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

40+
if [ -f "$NPMRC_FILE" ]; then
41+
echo "Copy .npmrc file to $PACKAGE_DIR"
42+
cp "$NPMRC_FILE" "$PACKAGE_DIR"
43+
fi
44+
3445
echo "Building package $PACKAGE in $PACKAGE_DIR"
3546
cd "$PACKAGE_DIR"
3647

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

60+
if [ -f "$NPMRC_FILE" ]; then
61+
echo "Copy .npmrc file to $PACKAGE_DIR"
62+
cp "$NPMRC_FILE" "$PACKAGE_DIR"
63+
fi
64+
4965
echo "Building package $PACKAGE in $PACKAGE_DIR"
5066
cd "$PACKAGE_DIR"
5167

sdk/feature-management-applicationinsights-browser/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"name": "@microsoft/feature-management-applicationinsights-browser",
33
"version": "2.0.0",
44
"description": "Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation events produced by the Feature Management library.",
5-
"main": "./dist/umd/index.js",
5+
"main": "./dist/esm/index.js",
66
"module": "./dist/esm/index.js",
7+
"type": "module",
78
"types": "types/index.d.ts",
89
"files": [
910
"dist/",

sdk/feature-management-applicationinsights-browser/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ export default [
3838
input: "src/index.ts",
3939
output: [{ file: "types/index.d.ts", format: "esm" }],
4040
plugins: [dts()],
41-
},
41+
}
4242
];

sdk/feature-management-applicationinsights-node/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ export default [
4444
input: "src/index.ts",
4545
output: [{ file: "types/index.d.ts", format: "esm" }],
4646
plugins: [dts()],
47-
},
47+
}
4848
];

0 commit comments

Comments
 (0)