Skip to content

Commit

Permalink
fixup! fixup! feat: hybrid commonJS & es module build
Browse files Browse the repository at this point in the history
  • Loading branch information
ctavan committed Oct 13, 2019
1 parent e7a6d42 commit 31ba7a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ done
echo "Removing browser-specific files from esm-node"
rm -f "$DIR"/esm-node/lib/*-browser.js

echo "Renaming node-specific esm files to .mjs"
for FILE in $( find "$DIR/esm-node" -name '*.js' )
do
sed -ie "s/\.js'/.mjs'/" "$FILE"
mv "$FILE" "${FILE%.js}.mjs"
done

# Copy basic files
for PATTERN in CHANGELOG.md \
package.json \
Expand Down

0 comments on commit 31ba7a2

Please sign in to comment.