reactivated 0.36.0 → 0.36.1
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/build.client.mjs +11 -1
- package/dist/build.client.mjs.map +1 -1
- package/package.json +1 -1
- package/src/build.client.mts +18 -1
package/dist/build.client.mjs
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { vanillaExtractPlugin } from "@vanilla-extract/esbuild-plugin";
|
|
3
3
|
import * as esbuild from "esbuild";
|
|
4
4
|
import ImportGlobPlugin from "esbuild-plugin-import-glob";
|
|
5
|
+
import { execSync, exec } from "child_process";
|
|
6
|
+
import fs from "fs";
|
|
5
7
|
const entryNames = process.argv.slice(2);
|
|
6
8
|
const entryPoints = Object.fromEntries(entryNames.map((entry) => [entry, `./client/${entry}.tsx`]));
|
|
7
9
|
const production = process.env.NODE_ENV === "production";
|
|
@@ -10,7 +12,12 @@ const env = {
|
|
|
10
12
|
NODE_ENV: production ? "production" : "development",
|
|
11
13
|
BUILD_VERSION: process.env.BUILD_VERSION,
|
|
12
14
|
TAG_VERSION: process.env.TAG_VERSION,
|
|
15
|
+
RELEASE_VERSION: process.env.RELEASE_VERSION,
|
|
13
16
|
};
|
|
17
|
+
const hasTailwind = fs.existsSync("./tailwind.config.ts");
|
|
18
|
+
if (hasTailwind) {
|
|
19
|
+
execSync("npx tailwind -i client/input.css -o ./node_modules/_reactivated/tailwind.css", { stdio: "ignore" });
|
|
20
|
+
}
|
|
14
21
|
esbuild
|
|
15
22
|
.context({
|
|
16
23
|
entryPoints,
|
|
@@ -25,7 +32,7 @@ esbuild
|
|
|
25
32
|
sourcemap: true,
|
|
26
33
|
target: "es2018",
|
|
27
34
|
preserveSymlinks: true,
|
|
28
|
-
external: ["
|
|
35
|
+
external: ["@reactivated/images"],
|
|
29
36
|
define: {
|
|
30
37
|
// You need both. The one from the stringified JSON is not picked
|
|
31
38
|
// up during the build process.
|
|
@@ -57,6 +64,9 @@ esbuild
|
|
|
57
64
|
})
|
|
58
65
|
.then(async (context) => {
|
|
59
66
|
if (production === false) {
|
|
67
|
+
if (hasTailwind) {
|
|
68
|
+
exec("npx tailwind -i client/input.css -o ./node_modules/_reactivated/tailwind.css --watch");
|
|
69
|
+
}
|
|
60
70
|
context.watch();
|
|
61
71
|
}
|
|
62
72
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.client.mjs","sourceRoot":"","sources":["../src/build.client.mts"],"names":[],"mappings":";AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"build.client.mjs","sourceRoot":"","sources":["../src/build.client.mts"],"names":[],"mappings":";AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEzC,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAClC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,CAAC,CAC9D,CAAC;AAEF,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AACzD,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;AAEnD,MAAM,GAAG,GAAG;IACR,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,Y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,gEAAgE;QAChE,YAAY;QACZ,oBAAoB,CAAC,EAAC,WAAW,EAAC,CAAC;KACtC;CACJ,CAAC;KACD,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACpB,IAAI,UAAU,KAAK,KAAK,EAAE;QACtB,IAAI,WAAW,EAAE;YACb,IAAI,CACA,sFAAsF,CACzF,CAAC;SACL;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;KACnB;SAAM;QACH,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,EAAE,CAAC;KAClB;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/build.client.mts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import {vanillaExtractPlugin} from "@vanilla-extract/esbuild-plugin";
|
|
4
4
|
import * as esbuild from "esbuild";
|
|
5
5
|
import ImportGlobPlugin from "esbuild-plugin-import-glob";
|
|
6
|
+
import {execSync, exec} from "child_process";
|
|
7
|
+
import fs from "fs";
|
|
6
8
|
|
|
7
9
|
const entryNames = process.argv.slice(2);
|
|
8
10
|
|
|
@@ -17,8 +19,18 @@ const env = {
|
|
|
17
19
|
NODE_ENV: production ? "production" : "development",
|
|
18
20
|
BUILD_VERSION: process.env.BUILD_VERSION,
|
|
19
21
|
TAG_VERSION: process.env.TAG_VERSION,
|
|
22
|
+
RELEASE_VERSION: process.env.RELEASE_VERSION,
|
|
20
23
|
};
|
|
21
24
|
|
|
25
|
+
const hasTailwind = fs.existsSync("./tailwind.config.ts");
|
|
26
|
+
|
|
27
|
+
if (hasTailwind) {
|
|
28
|
+
execSync(
|
|
29
|
+
"npx tailwind -i client/input.css -o ./node_modules/_reactivated/tailwind.css",
|
|
30
|
+
{stdio: "ignore"},
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
22
34
|
esbuild
|
|
23
35
|
.context({
|
|
24
36
|
entryPoints,
|
|
@@ -33,7 +45,7 @@ esbuild
|
|
|
33
45
|
sourcemap: true,
|
|
34
46
|
target: "es2018",
|
|
35
47
|
preserveSymlinks: true,
|
|
36
|
-
external: ["
|
|
48
|
+
external: ["@reactivated/images"],
|
|
37
49
|
define: {
|
|
38
50
|
// You need both. The one from the stringified JSON is not picked
|
|
39
51
|
// up during the build process.
|
|
@@ -66,6 +78,11 @@ esbuild
|
|
|
66
78
|
})
|
|
67
79
|
.then(async (context) => {
|
|
68
80
|
if (production === false) {
|
|
81
|
+
if (hasTailwind) {
|
|
82
|
+
exec(
|
|
83
|
+
"npx tailwind -i client/input.css -o ./node_modules/_reactivated/tailwind.css --watch",
|
|
84
|
+
);
|
|
85
|
+
}
|
|
69
86
|
context.watch();
|
|
70
87
|
} else {
|
|
71
88
|
await context.rebuild();
|