create-cloudinary-react 1.0.0-beta.11 → 1.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +1 -1
- package/cli.js +130 -84
- package/package.json +1 -2
- package/templates/README.md.template +2 -2
- package/templates/src/App.css.template +8 -2
- package/templates/src/App.tsx.template +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [1.0.0-beta.13](https://github.com/cloudinary-devs/create-cloudinary-react/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2026-02-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* simplify AI prompts section with clear copy-paste instructions ([2b60415](https://github.com/cloudinary-devs/create-cloudinary-react/commit/2b60415c1d3e23aabbe95b2c5366078857a5b37c))
|
|
7
|
+
|
|
8
|
+
# [1.0.0-beta.12](https://github.com/cloudinary-devs/create-cloudinary-react/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2026-02-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove console.log ([369e92f](https://github.com/cloudinary-devs/create-cloudinary-react/commit/369e92f3cb3e5af633c1553380119d5a685ec506))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* non-interactive 'headless' mode ([4334991](https://github.com/cloudinary-devs/create-cloudinary-react/commit/4334991f99eddfb3ae2b017c977f9c69c0c500fd))
|
|
19
|
+
|
|
1
20
|
# [1.0.0-beta.11](https://github.com/cloudinary-devs/create-cloudinary-react/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2026-01-30)
|
|
2
21
|
|
|
3
22
|
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npx create-cloudinary-react
|
|
|
22
22
|
The CLI will prompt you for:
|
|
23
23
|
- Project name
|
|
24
24
|
- **Cloudinary cloud name** (found in your [dashboard](https://console.cloudinary.com/app/home/dashboard))
|
|
25
|
-
- Upload preset (optional - required for uploads, but transformations work without it)
|
|
25
|
+
- Unsigned Upload preset (optional - required for uploads, but transformations work without it)
|
|
26
26
|
- AI coding assistant(s) you're using (Cursor, GitHub Copilot, Claude, etc.)
|
|
27
27
|
- Whether to install dependencies
|
|
28
28
|
- Whether to start dev server
|
package/cli.js
CHANGED
|
@@ -7,6 +7,7 @@ import { execSync } from 'child_process';
|
|
|
7
7
|
import inquirer from 'inquirer';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
9
|
import fs from 'fs-extra';
|
|
10
|
+
import { parseArgs } from 'node:util';
|
|
10
11
|
|
|
11
12
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
13
|
const __dirname = dirname(__filename);
|
|
@@ -24,95 +25,140 @@ function isValidProjectName(name) {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
async function main() {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
let answers = {};
|
|
30
|
+
|
|
31
|
+
if (process.argv.includes('--headless')) {
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
const { values, positionals } = parseArgs({
|
|
34
|
+
options: {
|
|
35
|
+
headless: {
|
|
36
|
+
type: 'boolean'
|
|
37
|
+
},
|
|
38
|
+
projectName: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
default: 'my-cloudinary-app'
|
|
41
|
+
},
|
|
42
|
+
cloudName: {
|
|
43
|
+
type: 'string'
|
|
44
|
+
},
|
|
45
|
+
hasUploadPreset: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
uploadPreset: {
|
|
50
|
+
type: 'string'
|
|
51
|
+
},
|
|
52
|
+
aiTools: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
multiple: true,
|
|
55
|
+
default: ['cursor']
|
|
56
|
+
},
|
|
57
|
+
installDeps: {
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
61
|
+
startDev: {
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
default: false
|
|
39
64
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
Object.assign(answers, values);
|
|
69
|
+
|
|
70
|
+
} else {
|
|
71
|
+
|
|
72
|
+
console.log(chalk.cyan.bold('\n🚀 Cloudinary React + Vite\n'));
|
|
73
|
+
console.log(chalk.gray('💡 Need a Cloudinary account? Sign up for free: https://cloudinary.com/users/register/free\n'));
|
|
74
|
+
|
|
75
|
+
answers = await inquirer.prompt([
|
|
76
|
+
{
|
|
77
|
+
type: 'input',
|
|
78
|
+
name: 'projectName',
|
|
79
|
+
message: 'What’s your project’s name?\n',
|
|
80
|
+
default: 'my-cloudinary-app',
|
|
81
|
+
validate: (input) => {
|
|
82
|
+
if (!input.trim()) {
|
|
83
|
+
return 'Project name cannot be empty';
|
|
84
|
+
}
|
|
85
|
+
if (!isValidProjectName(input)) {
|
|
86
|
+
return 'Project name can only contain letters, numbers, hyphens, and underscores';
|
|
87
|
+
}
|
|
88
|
+
if (existsSync(input)) {
|
|
89
|
+
return `Directory "${input}" already exists. Please choose a different name.`;
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
},
|
|
47
93
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
94
|
+
{
|
|
95
|
+
type: 'input',
|
|
96
|
+
name: 'cloudName',
|
|
97
|
+
message:
|
|
98
|
+
'What’s your Cloudinary cloud name?\n' +
|
|
99
|
+
chalk.gray(' → Find your cloud name: https://console.cloudinary.com/app/home/dashboard') + '\n',
|
|
100
|
+
validate: (input) => {
|
|
101
|
+
if (!input.trim()) {
|
|
102
|
+
return chalk.yellow(
|
|
103
|
+
'Cloud name is required.\n' +
|
|
104
|
+
' → Sign up: https://cloudinary.com/users/register/free\n' +
|
|
105
|
+
' → Find your cloud name: https://console.cloudinary.com/app/home/dashboard'
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
if (!isValidCloudName(input)) {
|
|
109
|
+
return 'Cloud name can only contain lowercase letters, numbers, hyphens, and underscores';
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
},
|
|
67
113
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
114
|
+
{
|
|
115
|
+
type: 'confirm',
|
|
116
|
+
name: 'hasUploadPreset',
|
|
117
|
+
message:
|
|
118
|
+
'Do you have an unsigned upload preset?\n' +
|
|
119
|
+
chalk.gray(' → You’ll need one if you want to upload new images to Cloudinary,\n but not if you only want to transform or deliver existing images.') + '\n' +
|
|
120
|
+
chalk.gray(' → Create one here: https://console.cloudinary.com/app/settings/upload/presets') + '\n',
|
|
121
|
+
default: false,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: 'input',
|
|
125
|
+
name: 'uploadPreset',
|
|
126
|
+
message: 'What’s your unsigned upload preset’s name?\n',
|
|
127
|
+
when: (answers) => answers.hasUploadPreset,
|
|
128
|
+
validate: (input) => {
|
|
129
|
+
if (!input.trim()) {
|
|
130
|
+
return 'Upload preset name cannot be empty';
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'checkbox',
|
|
137
|
+
name: 'aiTools',
|
|
138
|
+
message: 'Which AI coding assistant(s) are you using? (Select all that apply)',
|
|
139
|
+
choices: [
|
|
140
|
+
{ name: 'Cursor', value: 'cursor' },
|
|
141
|
+
{ name: 'GitHub Copilot', value: 'copilot' },
|
|
142
|
+
{ name: 'Claude Code / Claude Desktop', value: 'claude' },
|
|
143
|
+
{ name: 'Other / Generic AI tools', value: 'generic' },
|
|
144
|
+
],
|
|
145
|
+
default: ['cursor'],
|
|
88
146
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
name: 'installDeps',
|
|
105
|
-
message: 'Install dependencies now?\n',
|
|
106
|
-
default: true,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
type: 'confirm',
|
|
110
|
-
name: 'startDev',
|
|
111
|
-
message: 'Start development server?\n',
|
|
112
|
-
default: false,
|
|
113
|
-
when: (answers) => answers.installDeps,
|
|
114
|
-
},
|
|
115
|
-
]);
|
|
147
|
+
{
|
|
148
|
+
type: 'confirm',
|
|
149
|
+
name: 'installDeps',
|
|
150
|
+
message: 'Install dependencies now?\n',
|
|
151
|
+
default: true,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: 'confirm',
|
|
155
|
+
name: 'startDev',
|
|
156
|
+
message: 'Start development server?\n',
|
|
157
|
+
default: false,
|
|
158
|
+
when: (answers) => answers.installDeps,
|
|
159
|
+
},
|
|
160
|
+
]);
|
|
161
|
+
}
|
|
116
162
|
|
|
117
163
|
const { projectName, cloudName, uploadPreset, aiTools, installDeps, startDev } = answers;
|
|
118
164
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudinary-react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.13",
|
|
4
4
|
"description": "Scaffold a Cloudinary React + Vite + TypeScript project with interactive setup",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"react",
|
|
12
12
|
"vite",
|
|
13
13
|
"typescript",
|
|
14
|
-
"boilerplate",
|
|
15
14
|
"scaffold"
|
|
16
15
|
],
|
|
17
16
|
"author": "",
|
|
@@ -26,7 +26,7 @@ Your `.env` file has been pre-configured with:
|
|
|
26
26
|
|
|
27
27
|
**Note**: Transformations work without an upload preset (using sample images). Uploads require an unsigned upload preset.
|
|
28
28
|
|
|
29
|
-
To create an upload preset:
|
|
29
|
+
To create an unsigned upload preset:
|
|
30
30
|
1. Go to https://console.cloudinary.com/app/settings/upload/presets
|
|
31
31
|
2. Click "Add upload preset"
|
|
32
32
|
3. Set it to "Unsigned" mode
|
|
@@ -37,7 +37,7 @@ To create an upload preset:
|
|
|
37
37
|
|
|
38
38
|
This project includes AI coding rules for your selected AI assistant(s). The rules help AI assistants understand Cloudinary React SDK patterns, common errors, and best practices.
|
|
39
39
|
|
|
40
|
-
**Try the AI Prompts**: Check out the "🤖 Try Asking Your AI Assistant" section in the app for ready-to-use Cloudinary prompts to get started
|
|
40
|
+
**Try the AI Prompts**: Check out the "🤖 Try Asking Your AI Assistant" section in the app for ready-to-use Cloudinary prompts! Copy and paste them into your AI assistant to get started.
|
|
41
41
|
|
|
42
42
|
## Learn More
|
|
43
43
|
|
|
@@ -61,8 +61,13 @@ h2 {
|
|
|
61
61
|
|
|
62
62
|
.prompts-intro {
|
|
63
63
|
margin: 0.5rem 0 1rem 0;
|
|
64
|
-
color: rgba(255, 255, 255, 0.
|
|
64
|
+
color: rgba(255, 255, 255, 0.9);
|
|
65
65
|
text-align: center;
|
|
66
|
+
font-size: 1rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.prompts-intro strong {
|
|
70
|
+
color: rgba(99, 102, 241, 1);
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
.prompts-list {
|
|
@@ -84,7 +89,8 @@ h2 {
|
|
|
84
89
|
color: rgba(255, 255, 255, 0.9);
|
|
85
90
|
font-size: 0.9rem;
|
|
86
91
|
transition: all 0.2s;
|
|
87
|
-
|
|
92
|
+
user-select: text;
|
|
93
|
+
cursor: text;
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
.prompts-list li:hover {
|
|
@@ -33,7 +33,7 @@ function App() {
|
|
|
33
33
|
return (
|
|
34
34
|
<div className="app">
|
|
35
35
|
<main className="main-content">
|
|
36
|
-
<h1>Cloudinary React + Vite
|
|
36
|
+
<h1>Cloudinary React + Vite</h1>
|
|
37
37
|
<p>This is a ready-to-use development environment with Cloudinary integration.</p>
|
|
38
38
|
|
|
39
39
|
<div className="upload-section">
|
|
@@ -60,7 +60,9 @@ function App() {
|
|
|
60
60
|
|
|
61
61
|
<div className="ai-prompts-section">
|
|
62
62
|
<h2>🤖 Try Asking Your AI Assistant</h2>
|
|
63
|
-
<p className="prompts-intro">
|
|
63
|
+
<p className="prompts-intro">
|
|
64
|
+
<strong>Copy and paste</strong> one of these prompts into your AI assistant:
|
|
65
|
+
</p>
|
|
64
66
|
<ul className="prompts-list">
|
|
65
67
|
<li>Create an image gallery with lazy loading and responsive</li>
|
|
66
68
|
<li>Create a video player that plays a Cloudinary video</li>
|