Skip to content

Commit 8758ec1

Browse files
committed
apply modifications from review, minor stylistic changes
1 parent 08e6459 commit 8758ec1

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"webpack": "^4.30.0"
4545
},
4646
"scripts": {
47-
"build": "run-p build:cjs build:esm build:bundle && sh ../../scripts/postbuild.sh",
47+
"build": "run-p build:cjs build:esm build:bundle && bash ../../scripts/postbuild.sh",
4848
"build:bundle": "rollup --config",
4949
"build:cjs": "tsc -p tsconfig.cjs.json",
5050
"build:dev": "run-p build:cjs build:esm",

rollup.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,3 @@ export function makeConfigVariants(baseConfig) {
257257

258258
return configVariants;
259259
}
260-
261-
export const BUILD_DIR = 'build';
262-
export const BUNDLES_DIR = 'bundles';

scripts/postbuild.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
# in the copied package.json so that they align with the directory structure inside `build`.
77

88
BUILD_DIR=build
9-
CJS_DIR=dist
10-
ESM_DIR=esm
11-
TYPES_DIR=types
129

1310
ASSETS="README.md
1411
LICENSE
@@ -27,16 +24,16 @@ for f in $ASSETS; do
2724
done
2825

2926
# TEMPORARY (TODO remove in v7) copy types to esm and dist
30-
cp -r $BUILD_DIR/$TYPES_DIR/ $BUILD_DIR/$CJS_DIR
31-
cp -r $BUILD_DIR/$TYPES_DIR/ $BUILD_DIR/$ESM_DIR
27+
cp -r $BUILD_DIR/types/ $BUILD_DIR/dist
28+
cp -r $BUILD_DIR/types/ $BUILD_DIR/esm
3229

3330
# package.json modifications
3431

3532
# sed command to modify package.json entry points in build dir
3633
# remove `BUILD_DIR` from `main`, `module` and `type` entry point paths
3734
entryPointsCommand="/\"(main|module|types)\": .*,/s/$BUILD_DIR\///"
3835

39-
# modify volta extends path
36+
# sed command to modify volta extends path
4037
# remove one `../` from the extension path of volta
4138
voltaExtendsCommand="/\"extends\": \"\.\.\/\.\.\/\.\.\/package.json\"/s/\.\.\/\.\.\/\.\.\//\.\.\/\.\.\//"
4239

0 commit comments

Comments
 (0)