Commands
Following are all the scripts you can run and their explanation.
For Normal Usage
new
# Add new demo.
# @USAGE: yarn cli demoName
# @ARGUMENT: demoName is required.
# @ARGUMENT: Debug --debug or -d is optional.
# @ARGUMENT: Help --help or -h is optional.
# @USAGE: yarn new demoName
# When demoName/cloudName are the same.
yarn new <demoName>
# E.g. The following command:
# ❯ Adds a demo at CloudyCAM.dev/awais
# ❯ Fetches images in the cloudName `awais`
yarn new awais
# OR
# When demoName/cloudName are different.
yarn new <demoName> [cloudName]
# E.g. The following command:
# ❯ Adds a demo at CloudyCAM.dev/awais
# ❯ Fetches images in the cloudName `ahmadawais`
yarn new awais ahmadawais
# ❯ Angled brackets (e.g. <demoName>) indicate required input.
# ❯ Square brackets (e.g. [cloudName]) indicate optional input.
# ALIAS: Runs the CLI. Same as above.
yarn cli <demoName>
duplicate
# Duplicate a demo with a new cloudName and fetch images in their account.
# When newDemoName/cloudName are the same.
yarn duplicate <oldDemoName> <newDemoName>
# E.g. The following command:
# ❯ Duplicates the demo `awais` to create CloudyCAM.dev/ahmad
# ❯ Fetches images in the cloudName `ahmad`
yarn duplicate awais ahmad
# OR
# When newDemoName/cloudName are different.
yarn duplicate <oldDemoName> <newDemoName> [cloudName]
# E.g. The following command:
# ❯ Duplicates the demo `awais` to create CloudyCAM.dev/ahmad
# ❯ Fetches images in the cloudName `ahmadawais`
yarn duplicate awais ahmad ahmadawais
# ❯ Angled brackets (e.g. <demoName>) indicate required input.
# ❯ Square brackets (e.g. [cloudName]) indicate optional input.
context
# Get, Set, Define, Delete, and Change a context for the current stream of demos.
yarn context
# Change the context for an existing user with an existing context.
yarn context
# USAGE:
# ❯ Select `CHANGE Demo's Context`
# ❯ Select one of all the existing users
# ❯ Select one of all the existing contexts
# ❯ DONE!
upload
# Upload images from an existing demo page to any cloudName (even if the cloudName has nothing to do with CloudyCAM.dev)
yarn upload <demoName> <cloudName>
# E.g. The following command:
# ❯ Uploads/fetches the images from the demo `awais` to the cloudName `ahmadawais`
yarn upload awais ahmadawais
del
# Delete a demo from backup, database, the site, and deploy by a git commit/push in one go..
# @USAGE: yarn del demoName
yarn del <demoName>
# E.g. The following command:
# ❯ Deletes the demo `CloudyCAM.dev/awais`
yarn del awais
# Delete from DB + Cloudinary & Confirm in one go.
yarn del awais -y
docs
# Develop docs on the localhost.
yarn docs
# Build to the docs. Needs a manual git commit/push to be deployed.
yarn docs:build
# Build to the docs and deploy by a git commit/push in one go.
yarn docs:deploy
reset
# Reset everything to be the same as in the remote origin.
yarn reset
For Development Purposes
demo
# Start the site on localhost.
yarn start
# Build the site.
yarn build
# Download a demo image in the ./UPLOAD/ directory.
yarn demo
← 📥 UPDATE ⚙️ ZEIT NOW →