create-video 4.0.533 → 4.0.535

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.
@@ -1 +1,2 @@
1
- export declare const askSkills: () => Promise<boolean>;
1
+ export type SkillsInstallation = 'recommended' | 'choose';
2
+ export declare const askSkills: () => Promise<SkillsInstallation | null>;
@@ -1,25 +1,33 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.askSkills = void 0;
7
4
  const make_link_1 = require("./hyperlinks/make-link");
8
- const prompts_1 = __importDefault(require("./prompts"));
5
+ const prompts_1 = require("./prompts");
9
6
  const askSkills = async () => {
10
7
  const link = (0, make_link_1.makeHyperlink)({
11
8
  text: 'agent skills',
12
9
  url: 'https://remotion.dev/docs/ai/skills',
13
10
  fallback: 'agent skills',
14
11
  });
15
- const { answer } = await (0, prompts_1.default)({
16
- type: 'toggle',
17
- name: 'answer',
12
+ return (await (0, prompts_1.selectAsync)({
18
13
  message: `Add ${link}?`,
19
- initial: true,
20
- active: 'Yes',
21
- inactive: 'No',
22
- });
23
- return answer;
14
+ initial: 0,
15
+ choices: [
16
+ {
17
+ title: 'Install all skills',
18
+ description: 'Includes all Remotion guidance in one skill',
19
+ value: 'recommended',
20
+ },
21
+ {
22
+ title: 'Choose individual skills',
23
+ description: 'Select the skills that fit your project',
24
+ value: 'choose',
25
+ },
26
+ {
27
+ title: 'Skip skill installation',
28
+ value: null,
29
+ },
30
+ ],
31
+ }));
24
32
  };
25
33
  exports.askSkills = askSkills;
@@ -586,6 +586,6 @@ var src_default = () => {
586
586
  throw new Error("create-video is a CLI tool only. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!");
587
587
  };
588
588
  export {
589
- src_default as default,
590
- CreateVideoInternals
589
+ CreateVideoInternals,
590
+ src_default as default
591
591
  };
package/dist/help.js CHANGED
@@ -26,9 +26,13 @@ const getCreateVideoHelp = () => {
26
26
  flag: '--yes, -y',
27
27
  description: 'Enable non-interactive mode. Requires a template flag and a directory, unless --tmp is used.',
28
28
  }),
29
+ formatOption({
30
+ flag: '--tailwind',
31
+ description: 'Install TailwindCSS for supported templates.',
32
+ }),
29
33
  formatOption({
30
34
  flag: '--no-tailwind',
31
- description: 'Skip automatic TailwindCSS installation for supported templates.',
35
+ description: 'Skip TailwindCSS installation (the default).',
32
36
  }),
33
37
  formatOption({
34
38
  flag: '--tmp',
package/dist/init.js CHANGED
@@ -121,8 +121,8 @@ const init = async () => {
121
121
  const latestRemotionVersionPromise = (0, latest_remotion_version_1.getLatestRemotionVersion)({
122
122
  onError: log_1.Log.warn,
123
123
  });
124
- const shouldOverrideTailwind = selectedTemplate.allowEnableTailwind && !(0, select_template_1.isNoTailwindFlagSelected)();
125
- const shouldInstallSkills = (0, select_template_1.isYesFlagSelected)() ? false : await (0, ask_skills_1.askSkills)();
124
+ const shouldOverrideTailwind = selectedTemplate.allowEnableTailwind && (0, select_template_1.isTailwindFlagSelected)();
125
+ const skillsInstallation = (0, select_template_1.isYesFlagSelected)() ? null : await (0, ask_skills_1.askSkills)();
126
126
  const pkgManager = (0, pkg_managers_1.selectPackageManager)();
127
127
  const pkgManagerVersion = await (0, pkg_managers_1.getPackageManagerVersionOrNull)(pkgManager);
128
128
  try {
@@ -178,8 +178,8 @@ const init = async () => {
178
178
  if (!isInsideGitRepo) {
179
179
  await getGitStatus(projectRoot);
180
180
  }
181
- if (shouldInstallSkills) {
182
- await (0, install_skills_1.installSkills)(projectRoot);
181
+ if (skillsInstallation !== null) {
182
+ await (0, install_skills_1.installSkills)(projectRoot, skillsInstallation);
183
183
  }
184
184
  const relativeToCurrent = node_path_1.default.relative(process.cwd(), projectRoot);
185
185
  const cdToFolder = relativeToCurrent.startsWith('.')
@@ -1 +1,2 @@
1
- export declare const installSkills: (projectRoot: string) => Promise<void>;
1
+ import type { SkillsInstallation } from './ask-skills';
2
+ export declare const installSkills: (projectRoot: string, selection: SkillsInstallation) => Promise<void>;
@@ -8,19 +8,22 @@ const node_fs_1 = require("node:fs");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const execa_1 = __importDefault(require("execa"));
10
10
  const log_1 = require("./log");
11
- const installSkills = async (projectRoot) => {
11
+ const installSkills = async (projectRoot, selection) => {
12
12
  const command = process.platform === 'win32' ? 'npx.cmd' : 'npx';
13
+ const args = [
14
+ '-y',
15
+ '--loglevel=error',
16
+ 'skills@1.7.0',
17
+ 'add',
18
+ 'remotion-dev/skills',
19
+ '--agent',
20
+ 'universal',
21
+ ...(selection === 'recommended'
22
+ ? ['--skill', 'remotion-best-practices', '--yes']
23
+ : []),
24
+ ];
13
25
  try {
14
- await (0, execa_1.default)(command, [
15
- '-y',
16
- '--loglevel=error',
17
- 'skills@1.7.0',
18
- 'add',
19
- 'remotion-dev/skills',
20
- '--agent',
21
- 'universal',
22
- '--yes',
23
- ], {
26
+ await (0, execa_1.default)(command, args, {
24
27
  cwd: projectRoot,
25
28
  stdio: 'inherit',
26
29
  });
@@ -28,7 +31,7 @@ const installSkills = async (projectRoot) => {
28
31
  catch (e) {
29
32
  log_1.Log.error('Error installing skills:', e);
30
33
  log_1.Log.error('You can install them manually by running:');
31
- log_1.Log.error(' npx skills@1.7.0 add remotion-dev/skills --agent universal --yes');
34
+ log_1.Log.error(` npx ${args.join(' ')}`);
32
35
  return;
33
36
  }
34
37
  const agentsSkills = node_path_1.default.join(projectRoot, '.agents', 'skills');
@@ -1,7 +1,7 @@
1
1
  import type { Template } from './templates';
2
2
  export declare const isTmpFlagSelected: () => boolean;
3
3
  export declare const isYesFlagSelected: () => boolean;
4
- export declare const isNoTailwindFlagSelected: () => boolean;
4
+ export declare const isTailwindFlagSelected: () => boolean;
5
5
  export declare const isHelpFlagSelected: () => boolean;
6
6
  export declare const getPositionalArguments: () => string[];
7
7
  export declare const getDirectoryArgument: () => string | null;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.selectTemplate = exports.isFlagSelected = exports.getDirectoryArgument = exports.getPositionalArguments = exports.isHelpFlagSelected = exports.isNoTailwindFlagSelected = exports.isYesFlagSelected = exports.isTmpFlagSelected = void 0;
6
+ exports.selectTemplate = exports.isFlagSelected = exports.getDirectoryArgument = exports.getPositionalArguments = exports.isHelpFlagSelected = exports.isTailwindFlagSelected = exports.isYesFlagSelected = exports.isTmpFlagSelected = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const minimist_1 = __importDefault(require("minimist"));
9
9
  const make_link_1 = require("./hyperlinks/make-link");
@@ -15,7 +15,7 @@ const parsed = (0, minimist_1.default)(process.argv.slice(2), {
15
15
  ...ALL_TEMPLATES.map((f) => f.cliId),
16
16
  'tmp',
17
17
  'yes',
18
- 'no-tailwind',
18
+ 'tailwind',
19
19
  'help',
20
20
  ],
21
21
  string: ['_'],
@@ -25,8 +25,8 @@ const isTmpFlagSelected = () => parsed.tmp;
25
25
  exports.isTmpFlagSelected = isTmpFlagSelected;
26
26
  const isYesFlagSelected = () => parsed.yes;
27
27
  exports.isYesFlagSelected = isYesFlagSelected;
28
- const isNoTailwindFlagSelected = () => parsed.tailwind === false;
29
- exports.isNoTailwindFlagSelected = isNoTailwindFlagSelected;
28
+ const isTailwindFlagSelected = () => parsed.tailwind;
29
+ exports.isTailwindFlagSelected = isTailwindFlagSelected;
30
30
  const isHelpFlagSelected = () => parsed.help;
31
31
  exports.isHelpFlagSelected = isHelpFlagSelected;
32
32
  const getPositionalArguments = () => parsed._;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/create-video"
4
4
  },
5
5
  "name": "create-video",
6
- "version": "4.0.533",
6
+ "version": "4.0.535",
7
7
  "description": "Create a new Remotion project",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "@types/minimist": "1.2.2",
30
30
  "@types/prompts": "2.4.9",
31
31
  "react": "19.2.3",
32
- "@remotion/eslint-config-internal": "4.0.533",
32
+ "@remotion/eslint-config-internal": "4.0.535",
33
33
  "eslint": "9.19.0",
34
34
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
35
35
  },