@tamagui/generate-themes 1.140.3 → 1.141.0
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/write-generate-themes.cjs +4 -2
- package/dist/cjs/write-generate-themes.js +4 -2
- package/dist/cjs/write-generate-themes.js.map +1 -1
- package/dist/cjs/write-generate-themes.native.js +7 -2
- package/dist/cjs/write-generate-themes.native.js.map +1 -1
- package/dist/esm/write-generate-themes.js +4 -2
- package/dist/esm/write-generate-themes.js.map +1 -1
- package/dist/esm/write-generate-themes.mjs +4 -2
- package/dist/esm/write-generate-themes.mjs.map +1 -1
- package/dist/esm/write-generate-themes.native.js +7 -2
- package/dist/esm/write-generate-themes.native.js.map +1 -1
- package/package.json +5 -5
- package/src/write-generate-themes.ts +9 -1
- package/types/write-generate-themes.d.ts.map +1 -1
|
@@ -40,6 +40,8 @@ async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
|
40
40
|
const {
|
|
41
41
|
generated
|
|
42
42
|
} = generatedOutput;
|
|
43
|
-
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2))
|
|
44
|
-
|
|
43
|
+
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2));
|
|
44
|
+
const newContent = `// @ts-nocheck
|
|
45
|
+
` + generated;
|
|
46
|
+
(await fs.readFile(outPath, "utf-8").catch(() => null)) !== newContent && (await fs.writeFile(outPath, newContent));
|
|
45
47
|
}
|
|
@@ -29,7 +29,9 @@ var fs = __toESM(require("fs-extra"), 1);
|
|
|
29
29
|
async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
30
30
|
if (!generatedOutput) return;
|
|
31
31
|
const { generated } = generatedOutput;
|
|
32
|
-
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2))
|
|
33
|
-
|
|
32
|
+
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2));
|
|
33
|
+
const newContent = `// @ts-nocheck
|
|
34
|
+
` + generated;
|
|
35
|
+
await fs.readFile(outPath, "utf-8").catch(() => null) !== newContent && await fs.writeFile(outPath, newContent);
|
|
34
36
|
}
|
|
35
37
|
//# sourceMappingURL=write-generate-themes.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/write-generate-themes.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AAIpB,eAAsB,qBACpB,eACA,SACA,iBACA;AACA,MAAI,CAAC,gBAAiB;AAEtB,QAAM,EAAE,UAAU,IAAI;AAEtB,EAAI,QAAQ,IAAI,UAAU,aACxB,QAAQ,KAAK,qBAAqB,KAAK,UAAU,iBAAiB,MAAM,CAAC,CAAC,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AAIpB,eAAsB,qBACpB,eACA,SACA,iBACA;AACA,MAAI,CAAC,gBAAiB;AAEtB,QAAM,EAAE,UAAU,IAAI;AAEtB,EAAI,QAAQ,IAAI,UAAU,aACxB,QAAQ,KAAK,qBAAqB,KAAK,UAAU,iBAAiB,MAAM,CAAC,CAAC;AAG5E,QAAM,aAAa;AAAA,IAAqB;AAIxC,EADwB,MAAM,GAAG,SAAS,SAAS,OAAO,EAAE,MAAM,MAAM,IAAI,MACpD,cAIxB,MAAM,GAAG,UAAU,SAAS,UAAU;AACxC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -42,8 +42,13 @@ async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
|
42
42
|
var {
|
|
43
43
|
generated
|
|
44
44
|
} = generatedOutput;
|
|
45
|
-
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2))
|
|
46
|
-
|
|
45
|
+
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2));
|
|
46
|
+
var newContent = `// @ts-nocheck
|
|
47
|
+
` + generated,
|
|
48
|
+
existingContent = await fs.readFile(outPath, "utf-8").catch(function () {
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
existingContent !== newContent && (await fs.writeFile(outPath, newContent));
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
//# sourceMappingURL=write-generate-themes.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","write_generate_themes_exports","__export","writeGeneratedThemes","module","exports","fs","__toESM","require","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","write_generate_themes_exports","__export","writeGeneratedThemes","module","exports","fs","__toESM","require","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","newContent","existingContent","readFile","catch"],"sources":["../../src/write-generate-themes.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,6BAAA;AAAAC,QAAA,CAAAD,6BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAoB,GAAAT,YAAA,CAAAK,6BAAA;AAIpB,IAAAK,EAAA,GAAAC,OAAsB,CAAAC,OAAA,YACpB;AAIA,eAAKL,oBAAiBA,CAAAM,aAAA,EAAAC,OAAA,EAAAC,eAAA;EAEtB,IAAAA,eAAkB;IAEd;MAAQC;IAAI,IAAUD,eACxB;IAGFE,OAAM,CAAAC,GAAA,CAAAC,KAAa,kBAAAC,OAAA,CAAAC,IAAA,sBAAAC,IAAA,CAAAC,SAAA,CAAAR,eAAA;IAAqB,IAAAS,UAAA;AAIxC,IADwBR,SAAS;MAAAS,eAAkB,SAASf,EAAA,CAAAgB,QAAY,CAAAZ,OAAI,EACpD,SAAAa,KAIxB,aAAS;QACX","ignoreList":[]}
|
|
@@ -2,8 +2,10 @@ import * as fs from "fs-extra";
|
|
|
2
2
|
async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
3
3
|
if (!generatedOutput) return;
|
|
4
4
|
const { generated } = generatedOutput;
|
|
5
|
-
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2))
|
|
6
|
-
|
|
5
|
+
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2));
|
|
6
|
+
const newContent = `// @ts-nocheck
|
|
7
|
+
` + generated;
|
|
8
|
+
await fs.readFile(outPath, "utf-8").catch(() => null) !== newContent && await fs.writeFile(outPath, newContent);
|
|
7
9
|
}
|
|
8
10
|
export {
|
|
9
11
|
writeGeneratedThemes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/write-generate-themes.ts"],
|
|
4
|
-
"mappings": "AAAA,YAAY,QAAQ;AAIpB,eAAsB,qBACpB,eACA,SACA,iBACA;AACA,MAAI,CAAC,gBAAiB;AAEtB,QAAM,EAAE,UAAU,IAAI;AAEtB,EAAI,QAAQ,IAAI,UAAU,aACxB,QAAQ,KAAK,qBAAqB,KAAK,UAAU,iBAAiB,MAAM,CAAC,CAAC,
|
|
4
|
+
"mappings": "AAAA,YAAY,QAAQ;AAIpB,eAAsB,qBACpB,eACA,SACA,iBACA;AACA,MAAI,CAAC,gBAAiB;AAEtB,QAAM,EAAE,UAAU,IAAI;AAEtB,EAAI,QAAQ,IAAI,UAAU,aACxB,QAAQ,KAAK,qBAAqB,KAAK,UAAU,iBAAiB,MAAM,CAAC,CAAC;AAG5E,QAAM,aAAa;AAAA,IAAqB;AAIxC,EADwB,MAAM,GAAG,SAAS,SAAS,OAAO,EAAE,MAAM,MAAM,IAAI,MACpD,cAIxB,MAAM,GAAG,UAAU,SAAS,UAAU;AACxC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -4,8 +4,10 @@ async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
|
4
4
|
const {
|
|
5
5
|
generated
|
|
6
6
|
} = generatedOutput;
|
|
7
|
-
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2))
|
|
8
|
-
|
|
7
|
+
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2));
|
|
8
|
+
const newContent = `// @ts-nocheck
|
|
9
|
+
` + generated;
|
|
10
|
+
(await fs.readFile(outPath, "utf-8").catch(() => null)) !== newContent && (await fs.writeFile(outPath, newContent));
|
|
9
11
|
}
|
|
10
12
|
export { writeGeneratedThemes };
|
|
11
13
|
//# sourceMappingURL=write-generate-themes.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fs","writeGeneratedThemes","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","
|
|
1
|
+
{"version":3,"names":["fs","writeGeneratedThemes","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","newContent","readFile","catch","writeFile"],"sources":["../../src/write-generate-themes.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAYA,EAAA,MAAQ;AAIpB,eAAsBC,qBACpBC,aAAA,EACAC,OAAA,EACAC,eAAA,EACA;EACA,IAAI,CAACA,eAAA,EAAiB;EAEtB,MAAM;IAAEC;EAAU,IAAID,eAAA;EAElBE,OAAA,CAAQC,GAAA,CAAIC,KAAA,KAAU,aACxBC,OAAA,CAAQC,IAAA,CAAK,qBAAqBC,IAAA,CAAKC,SAAA,CAAUR,eAAA,EAAiB,MAAM,CAAC,CAAC;EAG5E,MAAMS,UAAA,GAAa;AAAA,IAAqBR,SAAA;EAGhB,OAAML,EAAA,CAAGc,QAAA,CAASX,OAAA,EAAS,OAAO,EAAEY,KAAA,CAAM,MAAM,IAAI,OACpDF,UAAA,KAIxB,MAAMb,EAAA,CAAGgB,SAAA,CAAUb,OAAA,EAASU,UAAU;AACxC","ignoreList":[]}
|
|
@@ -4,8 +4,13 @@ async function writeGeneratedThemes(tamaguiDotDir, outPath, generatedOutput) {
|
|
|
4
4
|
var {
|
|
5
5
|
generated
|
|
6
6
|
} = generatedOutput;
|
|
7
|
-
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2))
|
|
8
|
-
|
|
7
|
+
process.env.DEBUG === "tamagui" && console.info("Generated themes:", JSON.stringify(generatedOutput, null, 2));
|
|
8
|
+
var newContent = `// @ts-nocheck
|
|
9
|
+
` + generated,
|
|
10
|
+
existingContent = await fs.readFile(outPath, "utf-8").catch(function () {
|
|
11
|
+
return null;
|
|
12
|
+
});
|
|
13
|
+
existingContent !== newContent && (await fs.writeFile(outPath, newContent));
|
|
9
14
|
}
|
|
10
15
|
}
|
|
11
16
|
export { writeGeneratedThemes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fs","writeGeneratedThemes","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","
|
|
1
|
+
{"version":3,"names":["fs","writeGeneratedThemes","tamaguiDotDir","outPath","generatedOutput","generated","process","env","DEBUG","console","info","JSON","stringify","newContent","existingContent","readFile","catch"],"sources":["../../src/write-generate-themes.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAYA,EAAA,MAAQ;AAIpB,eAAsBC,qBACpBC,aAAA,EACAC,OAAA,EACAC,eAAA,EACA;EACA,IAAIA,eAAC,EAAiB;IAEtB,IAAM;MAAEC;IAAU,IAAID,eAAA;IAElBE,OAAQ,CAAAC,GAAI,CAAAC,KAAA,KAAU,aACxBC,OAAQ,CAAAC,IAAK,oBAAqB,EAAAC,IAAK,CAAAC,SAAU,CAAAR,eAAiB,MAAM,EAAE;IAG5E,IAAMS,UAAA,GAAa;AAAA,IAAqBR,SAAA;MAAAS,eAAA,SAAAd,EAAA,CAAAe,QAAA,CAAAZ,OAAA,WAAAa,KAAA;QAGhB,OAAS;MAMnC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/generate-themes",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.141.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/create-theme": "1.
|
|
38
|
-
"@tamagui/theme-builder": "1.
|
|
39
|
-
"@tamagui/types": "1.
|
|
37
|
+
"@tamagui/create-theme": "1.141.0",
|
|
38
|
+
"@tamagui/theme-builder": "1.141.0",
|
|
39
|
+
"@tamagui/types": "1.141.0",
|
|
40
40
|
"esbuild-register": "^3.6.0",
|
|
41
41
|
"fs-extra": "^11.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@tamagui/build": "1.
|
|
44
|
+
"@tamagui/build": "1.141.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -15,5 +15,13 @@ export async function writeGeneratedThemes(
|
|
|
15
15
|
console.info(`Generated themes:`, JSON.stringify(generatedOutput, null, 2))
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const newContent = `// @ts-nocheck\n` + generated
|
|
19
|
+
|
|
20
|
+
// Skip writing if contents are unchanged
|
|
21
|
+
const existingContent = await fs.readFile(outPath, 'utf-8').catch(() => null)
|
|
22
|
+
if (existingContent === newContent) {
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
await fs.writeFile(outPath, newContent)
|
|
19
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-generate-themes.d.ts","sourceRoot":"","sources":["../src/write-generate-themes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"write-generate-themes.d.ts","sourceRoot":"","sources":["../src/write-generate-themes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,iBAmB5D"}
|