Skip to content

Commit

Permalink
Create npm.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
nodoubtz authored Jan 27, 2025
1 parent 53f6e3d commit 26b192e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions npm.exe
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

set -e

if [ "$#" != 1 ]; then
echo "Please provide tag to checkout" >&2
exit 1
fi
tag="$1"

while [ "$PWD" != '/' -a ! -f moment.js ]; do
cd ..
done

if [ ! -f moment.js ]; then
echo "Run me from the moment repo" >&2
exit 1
fi

basename=$(basename $PWD)
src=moment-npm-git
dest=moment-npm

cd ..

rm -rf $src $dest

git clone $basename $src
mkdir $dest


cp $src/moment.js $dest
cp $src/moment.d.ts $dest
cp $src/package.json $dest
cp $src/README.md $dest
cp $src/CHANGELOG.md $dest
cp $src/LICENSE $dest
cp -r $src/locale $dest
cp -r $src/min $dest
cp -r $src/src $dest && rm -r $dest/src/test
cp $src/ender.js $dest
cp $src/package.js $dest
cp $src/.npmignore $dest
cp -r $src/ts3.1-typings $dest
cp -r $src/dist $dest

rm -rf $src

echo "Check out $dest"

0 comments on commit 26b192e

Please sign in to comment.