@remotion/tailwind 4.0.186 → 4.0.187
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/dist/cjs/enable.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WebpackConfiguration } from '@remotion/bundler';
|
|
2
2
|
/**
|
|
3
3
|
* @description A function that modifies the default Webpack configuration to make the necessary changes to support Tailwind.
|
|
4
4
|
* @see [Documentation](https://www.remotion.dev/docs/tailwind/enable-tailwind)
|
|
5
5
|
*/
|
|
6
|
-
export declare const enableTailwind:
|
|
6
|
+
export declare const enableTailwind: (currentConfiguration: WebpackConfiguration, options?: {
|
|
7
|
+
configLocation?: string;
|
|
8
|
+
}) => WebpackConfiguration;
|
package/dist/cjs/enable.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.enableTailwind = void 0;
|
|
|
5
5
|
* @description A function that modifies the default Webpack configuration to make the necessary changes to support Tailwind.
|
|
6
6
|
* @see [Documentation](https://www.remotion.dev/docs/tailwind/enable-tailwind)
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
exports.enableTailwind = ((currentConfiguration, options) => {
|
|
9
9
|
var _a;
|
|
10
10
|
return {
|
|
11
11
|
...currentConfiguration,
|
|
@@ -26,7 +26,12 @@ const enableTailwind = (currentConfiguration) => {
|
|
|
26
26
|
postcssOptions: {
|
|
27
27
|
plugins: [
|
|
28
28
|
require.resolve('postcss-preset-env'),
|
|
29
|
-
|
|
29
|
+
[
|
|
30
|
+
require.resolve('tailwindcss'),
|
|
31
|
+
(options === null || options === void 0 ? void 0 : options.configLocation)
|
|
32
|
+
? { config: options.configLocation }
|
|
33
|
+
: {},
|
|
34
|
+
],
|
|
30
35
|
require.resolve('autoprefixer'),
|
|
31
36
|
],
|
|
32
37
|
},
|
|
@@ -37,5 +42,4 @@ const enableTailwind = (currentConfiguration) => {
|
|
|
37
42
|
],
|
|
38
43
|
},
|
|
39
44
|
};
|
|
40
|
-
};
|
|
41
|
-
exports.enableTailwind = enableTailwind;
|
|
45
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.findRemotionRoot = exports.findClosestPackageJson = void 0;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const recursionLimit = 5;
|
|
10
|
+
const findClosestPackageJson = () => {
|
|
11
|
+
let currentDir = process.cwd();
|
|
12
|
+
let possiblePackageJson = '';
|
|
13
|
+
for (let i = 0; i < recursionLimit; i++) {
|
|
14
|
+
possiblePackageJson = node_path_1.default.join(currentDir, 'package.json');
|
|
15
|
+
const exists = node_fs_1.default.existsSync(possiblePackageJson);
|
|
16
|
+
if (exists) {
|
|
17
|
+
return possiblePackageJson;
|
|
18
|
+
}
|
|
19
|
+
currentDir = node_path_1.default.dirname(currentDir);
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
|
+
exports.findClosestPackageJson = findClosestPackageJson;
|
|
24
|
+
const findRemotionRoot = () => {
|
|
25
|
+
const closestPackageJson = (0, exports.findClosestPackageJson)();
|
|
26
|
+
if (closestPackageJson === null) {
|
|
27
|
+
return process.cwd();
|
|
28
|
+
}
|
|
29
|
+
return node_path_1.default.dirname(closestPackageJson);
|
|
30
|
+
};
|
|
31
|
+
exports.findRemotionRoot = findRemotionRoot;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import {createRequire} from "node:module";
|
|
|
2
2
|
var __require = createRequire(import.meta.url);
|
|
3
3
|
|
|
4
4
|
// src/enable.ts
|
|
5
|
-
var enableTailwind = (currentConfiguration) => {
|
|
5
|
+
var enableTailwind = (currentConfiguration, options) => {
|
|
6
6
|
return {
|
|
7
7
|
...currentConfiguration,
|
|
8
8
|
module: {
|
|
@@ -20,7 +20,10 @@ var enableTailwind = (currentConfiguration) => {
|
|
|
20
20
|
postcssOptions: {
|
|
21
21
|
plugins: [
|
|
22
22
|
__require.resolve("postcss-preset-env"),
|
|
23
|
-
|
|
23
|
+
[
|
|
24
|
+
__require.resolve("tailwindcss"),
|
|
25
|
+
options?.configLocation ? { config: options.configLocation } : {}
|
|
26
|
+
],
|
|
24
27
|
__require.resolve("autoprefixer")
|
|
25
28
|
]
|
|
26
29
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/tailwind"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/tailwind",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.187",
|
|
7
7
|
"description": "Enable TailwindCSS support in Remotion",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"tailwindcss": "^3.3.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@remotion/bundler": "4.0.
|
|
28
|
+
"@remotion/bundler": "4.0.187"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"autoprefixer": "^10.4.14",
|
|
32
|
-
"@remotion/bundler": "4.0.
|
|
32
|
+
"@remotion/bundler": "4.0.187"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"remotion",
|