Import files from a folder
How to a bulk import of packages into Cloudsmith in a folder
Once you have exported all your npm packages you can upload them to Cloudsmith- yay!
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.
cd into the folder.
#!/bin/bash FILES="." for f in * do echo "Processing $f file..." cloudsmith push $2 "$1" $f done
migrate_npm_to_cs.sh file passing the path of
<CLOUDSMITH_ORG>/<CLOUDSMITH_REPO> and the type.
./migrate_npm_to_cs.sh cloudsmith_org/cloudsmith_repo python
Updated 10 months ago