create-video 4.0.255 → 4.0.256

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,4 +1,3 @@
1
- export declare const addTailwindStyleCss: (projectRoot: string) => void;
2
- export declare const addTailwindConfigJs: (projectRoot: string) => void;
1
+ export declare const addPostcssConfig: (projectRoot: string) => void;
3
2
  export declare const addTailwindRootCss: (projectRoot: string) => void;
4
3
  export declare const addTailwindToConfig: (projectRoot: string) => void;
@@ -3,40 +3,33 @@ 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.addTailwindToConfig = exports.addTailwindRootCss = exports.addTailwindConfigJs = exports.addTailwindStyleCss = void 0;
6
+ exports.addTailwindToConfig = exports.addTailwindRootCss = exports.addPostcssConfig = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
- const addTailwindStyleCss = (projectRoot) => {
10
- const styleFile = path_1.default.join(projectRoot, 'src', 'tailwind.css');
11
- fs_1.default.writeFileSync(styleFile, `@tailwind base;
12
- @tailwind components;
13
- @tailwind utilities;
14
- `);
15
- };
16
- exports.addTailwindStyleCss = addTailwindStyleCss;
17
- const addTailwindConfigJs = (projectRoot) => {
18
- const tailwindConfigFile = path_1.default.join(projectRoot, 'tailwind.config.js');
19
- fs_1.default.writeFileSync(tailwindConfigFile, `/* eslint-env node */
20
- module.exports = {
21
- content: ["./src/**/*.{ts,tsx,js,jsx}"],
22
- theme: {
23
- extend: {},
9
+ const addPostcssConfig = (projectRoot) => {
10
+ const postcssConfigMjs = path_1.default.join(projectRoot, 'postcss.config.mjs');
11
+ fs_1.default.writeFileSync(postcssConfigMjs, `
12
+ export default {
13
+ plugins: {
14
+ "@tailwindcss/postcss": {},
24
15
  },
25
- plugins: [],
26
16
  };
27
- `);
17
+ `.trim() + '\n');
28
18
  };
29
- exports.addTailwindConfigJs = addTailwindConfigJs;
19
+ exports.addPostcssConfig = addPostcssConfig;
30
20
  const addTailwindRootCss = (projectRoot) => {
31
21
  const rootFileTsx = path_1.default.join(projectRoot, 'src', 'Root.tsx');
32
22
  const rootFileJsx = path_1.default.join(projectRoot, 'src', 'Root.jsx');
23
+ const indexCss = path_1.default.join(projectRoot, 'src', 'index.css');
33
24
  const rootFile = fs_1.default.existsSync(rootFileTsx) ? rootFileTsx : rootFileJsx;
34
25
  if (!fs_1.default.existsSync(rootFile)) {
35
26
  throw new Error('No Root file found');
36
27
  }
37
28
  const root = fs_1.default.readFileSync(rootFile, 'utf-8');
38
- const newFile = `import "./tailwind.css";\n${root}`;
29
+ const newFile = `import "./index.css";\n${root}`;
39
30
  fs_1.default.writeFileSync(rootFile, newFile);
31
+ const css = `@import "tailwindcss";\n`;
32
+ fs_1.default.writeFileSync(indexCss, css);
40
33
  };
41
34
  exports.addTailwindRootCss = addTailwindRootCss;
42
35
  const addTailwindToConfig = (projectRoot) => {
@@ -60,7 +53,7 @@ const addTailwindToConfig = (projectRoot) => {
60
53
  const tailLines = lines.slice(lastImportLine + 1);
61
54
  const newLines = [
62
55
  ...headerLines,
63
- `import { enableTailwind } from '@remotion/tailwind';`,
56
+ `import { enableTailwind } from '@remotion/tailwind-v4';`,
64
57
  ...tailLines,
65
58
  'Config.overrideWebpackConfig(enableTailwind);',
66
59
  ];
@@ -32,6 +32,7 @@ var listOfRemotionPackages = [
32
32
  "@remotion/studio-shared",
33
33
  "@remotion/zod-types",
34
34
  "@remotion/tailwind",
35
+ "@remotion/tailwind-v4",
35
36
  "@remotion/transitions",
36
37
  "@remotion/install-whisper-cpp",
37
38
  "@remotion/openai-whisper",
@@ -314,12 +315,12 @@ var FEATURED_TEMPLATES = [
314
315
  repoName: "template-overlay",
315
316
  description: "Overlays for video editing software",
316
317
  longerDescription: `
317
- \t\t\t<span>
318
- \t\t\t\tA starter template to create overlays to use in conventional video
319
- \t\t\t\tediting software.{' '}
320
- \t\t\t\t<a href="/docs/overlay">Read more about creating overlays.</a>
321
- \t\t\t</span>
322
- \t\t\t`,
318
+ <span>
319
+ A starter template to create overlays to use in conventional video
320
+ editing software.{' '}
321
+ <a href="/docs/overlay">Read more about creating overlays.</a>
322
+ </span>
323
+ `,
323
324
  promoVideo: {
324
325
  muxId: "zgy7XK01009y33Vfzhns02cZS00rOyeZ6WaanaxcrDysqmU",
325
326
  height: 720,
@@ -339,11 +340,11 @@ var FEATURED_TEMPLATES = [
339
340
  org: "remotion-dev",
340
341
  repoName: "template-code-hike",
341
342
  description: "Beautiful code animations",
342
- longerDescription: `\t\t\t
343
- \t\t\t\tAdd code snippets and animate between them using
344
- \t\t\t\t<a href="https://codehike.org/">Code Hike</a>. Supports many languages,
345
- \t\t\t\tTypeScript error annotations, and many themes.
346
- \t\t\t`,
343
+ longerDescription: `
344
+ Add code snippets and animate between them using
345
+ <a href="https://codehike.org/">Code Hike</a>. Supports many languages,
346
+ TypeScript error annotations, and many themes.
347
+ `,
347
348
  promoVideo: {
348
349
  muxId: "fKwnpTAOqvnZpu00fwEezi00cpF3927NumGcS1gGdUj8A",
349
350
  width: 1080,
package/dist/init.js CHANGED
@@ -100,9 +100,8 @@ const init = async () => {
100
100
  });
101
101
  (0, patch_readme_1.patchReadmeMd)(projectRoot, pkgManager, selectedTemplate);
102
102
  if (shouldOverrideTailwind) {
103
- (0, add_tailwind_1.addTailwindStyleCss)(projectRoot);
104
103
  (0, add_tailwind_1.addTailwindToConfig)(projectRoot);
105
- (0, add_tailwind_1.addTailwindConfigJs)(projectRoot);
104
+ (0, add_tailwind_1.addPostcssConfig)(projectRoot);
106
105
  (0, add_tailwind_1.addTailwindRootCss)(projectRoot);
107
106
  }
108
107
  (0, create_public_folder_1.createPublicFolder)(projectRoot);
@@ -35,6 +35,7 @@ exports.listOfRemotionPackages = [
35
35
  '@remotion/studio-shared',
36
36
  '@remotion/zod-types',
37
37
  '@remotion/tailwind',
38
+ '@remotion/tailwind-v4',
38
39
  '@remotion/transitions',
39
40
  '@remotion/install-whisper-cpp',
40
41
  '@remotion/openai-whisper',
@@ -41,7 +41,7 @@ const patchPackageJson = ({ projectRoot, projectName, latestRemotionVersion, pac
41
41
  const newDependenciesWithTailwind = addTailwind
42
42
  ? {
43
43
  ...newDependencies,
44
- '@remotion/tailwind': latestRemotionVersion,
44
+ '@remotion/tailwind-v4': latestRemotionVersion,
45
45
  }
46
46
  : newDependencies;
47
47
  const newPackageJson = JSON.stringify({
@@ -45,7 +45,7 @@ for (const packageManager of packageManagers) {
45
45
  dependencies: {
46
46
  ...packageJson.dependencies,
47
47
  '@remotion/cli': latestRemotionVersion,
48
- '@remotion/tailwind': latestRemotionVersion,
48
+ '@remotion/tailwind-v4': latestRemotionVersion,
49
49
  remotion: latestRemotionVersion,
50
50
  },
51
51
  sideEffects: ['*.css'],
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.255",
6
+ "version": "4.0.256",
7
7
  "description": "Create a new Remotion project",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "@types/tar": "6.1.1",
28
28
  "react": "19.0.0",
29
29
  "eslint": "9.14.0",
30
- "@remotion/eslint-config-internal": "4.0.255"
30
+ "@remotion/eslint-config-internal": "4.0.256"
31
31
  },
32
32
  "exports": {
33
33
  "./package.json": "./package.json",