Migrating to Cloudsmith
Import Files from a Folder
Once you have exported all your npm packages you can upload them to Cloudsmith.
First make sure you install the Cloudsmith CLI and export your token.
A folder of packages in the correct format can be published to Cloudsmith using the script below. We support over 28+ format types. The supported formats can be found here.
Create the bash script below and call it migrate_npm_to_cs.sh
and give it execute privileges.
Access the folder with your packages and run the next script:
shell
#!/bin/bash
FILES="."
FILES=$(find . -type f)
for f in $FILES
do
echo "Processing $f file..."
cloudsmith push "$1" "$2" "$f"
done
Execute the migrate_npm_to_cs.sh
file passing the format type and the path of <CLOUDSMITH_ORG>/<CLOUDSMITH_REPO>
.
shell
./migrate_npm_to_cs.sh python cloudsmith_org/cloudsmith_repo