This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CLI Tool for generating various types of files and folders for a SvelteKit project. | |
* | |
* This script automates the creation of common SvelteKit components such as layouts, pages, groups, components, | |
* and API routes, with support for generating additional files with flags. | |
* | |
* # Usage | |
* | |
* Run the script using `node`: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { v2 as cloudinary } from 'cloudinary'; | |
// get the environment variable, depends on your project. | |
// in this case, i use sveltekit with vite | |
import { VITE_CLOUDINARY_CLOUD_NAME, VITE_CLOUDINARY_KEY, VITE_CLOUDINARY_SECRET } from '$env/static/private' | |
cloudinary.config({ | |
cloud_name: VITE_CLOUDINARY_CLOUD_NAME, | |
api_key: VITE_CLOUDINARY_KEY, | |
api_secret: VITE_CLOUDINARY_SECRET, | |
// secure: true |