Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion npmimport.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

#run shell where you run npm install

# Get command line params
while getopts ":r:k:" opt; do
case $opt in
Expand All @@ -8,4 +10,17 @@ while getopts ":r:k:" opt; do
esac
done

find . -type f -not -path '*/\.*' -name '*.tgz' -exec npm publish {} --registry $REPO_URL \;
cd node_modules

for m in $(ls -d */ | cut -f1 -d'/')
do
if [ ${m:0:1} == "@" ]
then
for s in $(ls -d $m/*)
do
npm publish "$s" --registry $REPO_URL
done
else
npm publish $m --registry $REPO_URL
fi
done