File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ commit_lint() {
13
13
build_hybrid () {
14
14
set -x
15
15
rm -rfv dist
16
- npx tsup src/index.ts -d=dist/mjs --keep-names --format=esm --target=es2020 --external=reflect-metadata --sourcemap
17
- npx tsup src/index.ts -d=dist/cjs --keep-names --format=cjs --target=es2020 --external=reflect-metadata --sourcemap
16
+ formats=(' cjs' ' esm' )
17
+ for format in ${formats[*]} ; do
18
+ npx tsup src/index.ts -d=dist/${format} --keep-names --format=${format} --target=es2020 --external=reflect-metadata --sourcemap
19
+ done
18
20
npx tsup src/index.ts -d=dist --dts-only
19
- echo {\" type\" : \" module\" } > dist/mjs /package.json
21
+ echo {\" type\" : \" module\" } > dist/esm /package.json
20
22
echo {\" type\" : \" commonjs\" } > dist/cjs/package.json
21
23
cp -fv README.md LICENSE dist
22
24
cat package.json | jq " del(.type)" > dist/package.json
Original file line number Diff line number Diff line change 4
4
"license" : " MIT" ,
5
5
"description" : " Convert array of ValidationError objects from class-validator to multiline string" ,
6
6
"main" : " ./cjs/index.js" ,
7
- "module" : " ./mjs /index.mjs" ,
7
+ "module" : " ./esm /index.mjs" ,
8
8
"types" : " index.d.ts" ,
9
9
"exports" : {
10
10
"." : {
11
- "import" : " ./mjs /index.mjs" ,
11
+ "import" : " ./esm /index.mjs" ,
12
12
"require" : " ./cjs/index.js"
13
13
}
14
14
},
You can’t perform that action at this time.
0 commit comments