@tamagui/helpers-node 1.1.8 → 1.1.9
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/getDefaultTamaguiOptions.js.map +2 -2
- package/dist/getTamaguiDefaultPath.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +2 -2
- package/dist/readTamaguiOptions.js.map +2 -2
- package/package.json +5 -2
- package/src/getDefaultTamaguiOptions.ts +2 -1
- package/src/index.ts +0 -1
- package/src/readTamaguiOptions.ts +1 -1
- package/types/getDefaultTamaguiOptions.d.ts +1 -1
- package/types/getTamaguiOptions.d.ts +1 -1
- package/types/index.d.ts +0 -1
- package/types/readTamaguiOptions.d.ts +0 -1
- package/dist/types.js +0 -17
- package/dist/types.js.map +0 -7
- package/src/types.ts +0 -75
- package/types/types.d.ts +0 -74
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/getDefaultTamaguiOptions.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import type { TamaguiOptions } from '@tamagui/types'\n\nimport { getDefaultTamaguiConfigPath } from './getTamaguiDefaultPath'\n\nexport async function getDefaultTamaguiOptions({\n cwd = '.',\n}: {\n cwd: string\n}): Promise<TamaguiOptions> {\n return {\n components: ['tamagui'],\n config: await getDefaultTamaguiConfigPath({ cwd }),\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mCAA4C;AAE5C,eAAsB,yBAAyB;AAAA,EAC7C,MAAM;AACR,GAE4B;AAC1B,SAAO;AAAA,IACL,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ,UAAM,0DAA4B,EAAE,IAAI,CAAC;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/getTamaguiDefaultPath.ts"],
|
|
4
4
|
"sourcesContent": ["import { join } from 'path'\n\nimport { pathExists } from 'fs-extra'\n\nlet cachedPath = ''\n\nexport async function getDefaultTamaguiConfigPath({\n cwd = '.',\n cache = true,\n}: {\n cwd?: string\n // TODO this isn't passed down / could avoid\n cache?: boolean\n}) {\n if (cache && cachedPath) {\n return cachedPath\n }\n\n const defaultPaths = ['tamagui.config.ts', join('src', 'tamagui.config.ts')].map(\n (p) => join(cwd, p),\n )\n const existing = (\n await Promise.all(defaultPaths.map((path) => pathExists(path)))\n ).findIndex((x) => !!x)\n const found = defaultPaths[existing]\n if (!found) {\n throw new Error(`No found tamagui.config.ts`)\n }\n\n cachedPath = found\n return found\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AAErB,sBAA2B;AAE3B,IAAI,aAAa;AAEjB,eAAsB,4BAA4B;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AACV,GAIG;AACD,MAAI,SAAS,YAAY;AACvB,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,CAAC,yBAAqB,kBAAK,OAAO,mBAAmB,CAAC,EAAE;AAAA,IAC3E,CAAC,UAAM,kBAAK,KAAK,CAAC;AAAA,EACpB;AACA,QAAM,YACJ,MAAM,QAAQ,IAAI,aAAa,IAAI,CAAC,aAAS,4BAAW,IAAI,CAAC,CAAC,GAC9D,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AACtB,QAAM,QAAQ,aAAa;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AAErB,sBAA2B;AAE3B,IAAI,aAAa;AAEjB,eAAsB,4BAA4B;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AACV,GAIG;AACD,MAAI,SAAS,YAAY;AACvB,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,CAAC,yBAAqB,kBAAK,OAAO,mBAAmB,CAAC,EAAE;AAAA,IAC3E,CAAC,UAAM,kBAAK,KAAK,CAAC;AAAA,EACpB;AACA,QAAM,YACJ,MAAM,QAAQ,IAAI,aAAa,IAAI,CAAC,aAAS,4BAAW,IAAI,CAAC,CAAC,GAC9D,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AACtB,QAAM,QAAQ,aAAa,QAAQ;AACnC,MAAI,CAAC,OAAO;AACV,UAAM,IAAI,MAAM,4BAA4B;AAAA,EAC9C;AAEA,eAAa;AACb,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -18,5 +18,4 @@ module.exports = __toCommonJS(src_exports);
|
|
|
18
18
|
__reExport(src_exports, require("./readTamaguiOptions"), module.exports);
|
|
19
19
|
__reExport(src_exports, require("./getTamaguiDefaultPath"), module.exports);
|
|
20
20
|
__reExport(src_exports, require("./getTamaguiOptions"), module.exports);
|
|
21
|
-
__reExport(src_exports, require("./types"), module.exports);
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './readTamaguiOptions'\nexport * from './getTamaguiDefaultPath'\nexport * from './getTamaguiOptions'\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oCADd;AAEA,wBAAc,gCAFd;
|
|
4
|
+
"sourcesContent": ["export * from './readTamaguiOptions'\nexport * from './getTamaguiDefaultPath'\nexport * from './getTamaguiOptions'\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oCADd;AAEA,wBAAc,gCAFd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/readTamaguiOptions.ts"],
|
|
4
|
-
"sourcesContent": ["import { join } from 'path'\n\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;
|
|
4
|
+
"sourcesContent": ["import { join } from 'path'\n\nimport type { TamaguiOptions } from '@tamagui/types'\nimport { pathExists, readJSON } from 'fs-extra'\n\nimport { getDefaultTamaguiOptions } from './getDefaultTamaguiOptions'\n\nexport async function readTamaguiOptions({ cwd = '.' }: { cwd: string }) {\n const filePath = join(cwd, 'tamagui.json')\n\n if (!(await pathExists(filePath))) {\n return {\n exists: false,\n options: await getDefaultTamaguiOptions({ cwd }),\n }\n }\n\n try {\n const options = (await readJSON(filePath)) as TamaguiOptions\n\n if (!Array.isArray(options.components)) {\n throw new Error(`Invalid components: not string[]`)\n }\n\n return {\n exists: true,\n options: {\n ...(!options.config && (await getDefaultTamaguiOptions({ cwd }))),\n ...options,\n },\n }\n } catch (err: any) {\n // eslint-disable-next-line no-console\n console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`)\n\n return {\n exists: false,\n options: await getDefaultTamaguiOptions({ cwd }),\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AAGrB,sBAAqC;AAErC,sCAAyC;AAEzC,eAAsB,mBAAmB,EAAE,MAAM,IAAI,GAAoB;AACvE,QAAM,eAAW,kBAAK,KAAK,cAAc;AAEzC,MAAI,CAAE,UAAM,4BAAW,QAAQ,GAAI;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,UAAM,0DAAyB,EAAE,IAAI,CAAC;AAAA,IACjD;AAAA,EACF;AAEA,MAAI;AACF,UAAM,UAAW,UAAM,0BAAS,QAAQ;AAExC,QAAI,CAAC,MAAM,QAAQ,QAAQ,UAAU,GAAG;AACtC,YAAM,IAAI,MAAM,kCAAkC;AAAA,IACpD;AAEA,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,GAAI,CAAC,QAAQ,UAAW,UAAM,0DAAyB,EAAE,IAAI,CAAC;AAAA,QAC9D,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF,SAAS,KAAP;AAEA,YAAQ,MAAM,+BAA+B,IAAI,WAAW,IAAI,OAAO;AAEvE,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,UAAM,0DAAyB,EAAE,IAAI,CAAC;AAAA,IACjD;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-node",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "./dist",
|
|
@@ -15,8 +15,11 @@
|
|
|
15
15
|
"clean": "tamagui-build clean",
|
|
16
16
|
"clean:build": "tamagui-build clean:build"
|
|
17
17
|
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@tamagui/types": "^1.1.9"
|
|
20
|
+
},
|
|
18
21
|
"devDependencies": {
|
|
19
|
-
"@tamagui/build": "^1.1.
|
|
22
|
+
"@tamagui/build": "^1.1.9",
|
|
20
23
|
"fs-extra": "^10.1.0"
|
|
21
24
|
},
|
|
22
25
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { join } from 'path'
|
|
2
2
|
|
|
3
|
+
import type { TamaguiOptions } from '@tamagui/types'
|
|
3
4
|
import { pathExists, readJSON } from 'fs-extra'
|
|
4
5
|
|
|
5
6
|
import { getDefaultTamaguiOptions } from './getDefaultTamaguiOptions'
|
|
6
|
-
import type { TamaguiOptions } from './types'
|
|
7
7
|
|
|
8
8
|
export async function readTamaguiOptions({ cwd = '.' }: { cwd: string }) {
|
|
9
9
|
const filePath = join(cwd, 'tamagui.json')
|
package/types/index.d.ts
CHANGED
package/dist/types.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var types_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(types_exports);
|
|
17
|
-
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["export interface TamaguiOptions {\n /**\n * module paths you want to compile with tamagui (for example ['tamagui'])\n * */\n components: string[]\n /**\n * your tamagui.config.ts\n */\n config?: string\n /**\n * Tamagui can follow imports and evaluate them when parsing styles, leading to\n * higher percent of flattened / optimized views. We normalize this to be the\n * full path of the file, always ending in \".js\".\n *\n * So to have Tamagui partially evaluate \"app/src/constants.tsx\" you can put\n * [\"app/src/constants.js\"].\n */\n importsWhitelist?: string[]\n /**\n * Whitelist file extensions to evaluate\n *\n * @default ['.tsx', '.jsx']\n */\n includeExtensions?: string[]\n /**\n * Web-only. Allows you to trim the bundle size of react-native-web.\n * Pass in values like ['Switch', 'Modal'].\n */\n excludeReactNativeWebExports?: string[]\n /**\n * Enable logging the time it takes to extract.\n *\n * @default true\n */\n logTimings?: boolean\n /**\n * Custom prefix for the timing logs\n */\n prefixLogs?: string\n /**\n * Completely disable tamagui for these files\n */\n disable?: boolean | string[]\n /**\n * Disable just optimization for these files, but enable helpful debug attributes.\n */\n disableExtraction?: boolean | string[]\n /**\n * Disable just the addition of data- attributes that are added in dev mode to help\n * tie DOM to your filename/component-name.\n */\n disableDebugAttr?: boolean\n /**\n * (Advanced) Disable evaluation of useMedia() hook\n */\n disableExtractInlineMedia?: boolean\n /**\n * (Advanced) Disable just view flattening.\n */\n disableFlattening?: boolean\n /**\n * (Advanced) Disable extracting to theme variables.\n */\n disableExtractVariables?: boolean | 'theme'\n\n // probably non user options\n disableExtractFoundComponents?: boolean | string[]\n evaluateVars?: boolean\n cssPath?: string\n cssData?: any\n deoptProps?: Set<string>\n excludeProps?: Set<string>\n inlineProps?: Set<string>\n forceExtractStyleDefinitions?: boolean\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export interface TamaguiOptions {
|
|
2
|
-
/**
|
|
3
|
-
* module paths you want to compile with tamagui (for example ['tamagui'])
|
|
4
|
-
* */
|
|
5
|
-
components: string[]
|
|
6
|
-
/**
|
|
7
|
-
* your tamagui.config.ts
|
|
8
|
-
*/
|
|
9
|
-
config?: string
|
|
10
|
-
/**
|
|
11
|
-
* Tamagui can follow imports and evaluate them when parsing styles, leading to
|
|
12
|
-
* higher percent of flattened / optimized views. We normalize this to be the
|
|
13
|
-
* full path of the file, always ending in ".js".
|
|
14
|
-
*
|
|
15
|
-
* So to have Tamagui partially evaluate "app/src/constants.tsx" you can put
|
|
16
|
-
* ["app/src/constants.js"].
|
|
17
|
-
*/
|
|
18
|
-
importsWhitelist?: string[]
|
|
19
|
-
/**
|
|
20
|
-
* Whitelist file extensions to evaluate
|
|
21
|
-
*
|
|
22
|
-
* @default ['.tsx', '.jsx']
|
|
23
|
-
*/
|
|
24
|
-
includeExtensions?: string[]
|
|
25
|
-
/**
|
|
26
|
-
* Web-only. Allows you to trim the bundle size of react-native-web.
|
|
27
|
-
* Pass in values like ['Switch', 'Modal'].
|
|
28
|
-
*/
|
|
29
|
-
excludeReactNativeWebExports?: string[]
|
|
30
|
-
/**
|
|
31
|
-
* Enable logging the time it takes to extract.
|
|
32
|
-
*
|
|
33
|
-
* @default true
|
|
34
|
-
*/
|
|
35
|
-
logTimings?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* Custom prefix for the timing logs
|
|
38
|
-
*/
|
|
39
|
-
prefixLogs?: string
|
|
40
|
-
/**
|
|
41
|
-
* Completely disable tamagui for these files
|
|
42
|
-
*/
|
|
43
|
-
disable?: boolean | string[]
|
|
44
|
-
/**
|
|
45
|
-
* Disable just optimization for these files, but enable helpful debug attributes.
|
|
46
|
-
*/
|
|
47
|
-
disableExtraction?: boolean | string[]
|
|
48
|
-
/**
|
|
49
|
-
* Disable just the addition of data- attributes that are added in dev mode to help
|
|
50
|
-
* tie DOM to your filename/component-name.
|
|
51
|
-
*/
|
|
52
|
-
disableDebugAttr?: boolean
|
|
53
|
-
/**
|
|
54
|
-
* (Advanced) Disable evaluation of useMedia() hook
|
|
55
|
-
*/
|
|
56
|
-
disableExtractInlineMedia?: boolean
|
|
57
|
-
/**
|
|
58
|
-
* (Advanced) Disable just view flattening.
|
|
59
|
-
*/
|
|
60
|
-
disableFlattening?: boolean
|
|
61
|
-
/**
|
|
62
|
-
* (Advanced) Disable extracting to theme variables.
|
|
63
|
-
*/
|
|
64
|
-
disableExtractVariables?: boolean | 'theme'
|
|
65
|
-
|
|
66
|
-
// probably non user options
|
|
67
|
-
disableExtractFoundComponents?: boolean | string[]
|
|
68
|
-
evaluateVars?: boolean
|
|
69
|
-
cssPath?: string
|
|
70
|
-
cssData?: any
|
|
71
|
-
deoptProps?: Set<string>
|
|
72
|
-
excludeProps?: Set<string>
|
|
73
|
-
inlineProps?: Set<string>
|
|
74
|
-
forceExtractStyleDefinitions?: boolean
|
|
75
|
-
}
|
package/types/types.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export interface TamaguiOptions {
|
|
2
|
-
/**
|
|
3
|
-
* module paths you want to compile with tamagui (for example ['tamagui'])
|
|
4
|
-
* */
|
|
5
|
-
components: string[];
|
|
6
|
-
/**
|
|
7
|
-
* your tamagui.config.ts
|
|
8
|
-
*/
|
|
9
|
-
config?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Tamagui can follow imports and evaluate them when parsing styles, leading to
|
|
12
|
-
* higher percent of flattened / optimized views. We normalize this to be the
|
|
13
|
-
* full path of the file, always ending in ".js".
|
|
14
|
-
*
|
|
15
|
-
* So to have Tamagui partially evaluate "app/src/constants.tsx" you can put
|
|
16
|
-
* ["app/src/constants.js"].
|
|
17
|
-
*/
|
|
18
|
-
importsWhitelist?: string[];
|
|
19
|
-
/**
|
|
20
|
-
* Whitelist file extensions to evaluate
|
|
21
|
-
*
|
|
22
|
-
* @default ['.tsx', '.jsx']
|
|
23
|
-
*/
|
|
24
|
-
includeExtensions?: string[];
|
|
25
|
-
/**
|
|
26
|
-
* Web-only. Allows you to trim the bundle size of react-native-web.
|
|
27
|
-
* Pass in values like ['Switch', 'Modal'].
|
|
28
|
-
*/
|
|
29
|
-
excludeReactNativeWebExports?: string[];
|
|
30
|
-
/**
|
|
31
|
-
* Enable logging the time it takes to extract.
|
|
32
|
-
*
|
|
33
|
-
* @default true
|
|
34
|
-
*/
|
|
35
|
-
logTimings?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Custom prefix for the timing logs
|
|
38
|
-
*/
|
|
39
|
-
prefixLogs?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Completely disable tamagui for these files
|
|
42
|
-
*/
|
|
43
|
-
disable?: boolean | string[];
|
|
44
|
-
/**
|
|
45
|
-
* Disable just optimization for these files, but enable helpful debug attributes.
|
|
46
|
-
*/
|
|
47
|
-
disableExtraction?: boolean | string[];
|
|
48
|
-
/**
|
|
49
|
-
* Disable just the addition of data- attributes that are added in dev mode to help
|
|
50
|
-
* tie DOM to your filename/component-name.
|
|
51
|
-
*/
|
|
52
|
-
disableDebugAttr?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* (Advanced) Disable evaluation of useMedia() hook
|
|
55
|
-
*/
|
|
56
|
-
disableExtractInlineMedia?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* (Advanced) Disable just view flattening.
|
|
59
|
-
*/
|
|
60
|
-
disableFlattening?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* (Advanced) Disable extracting to theme variables.
|
|
63
|
-
*/
|
|
64
|
-
disableExtractVariables?: boolean | 'theme';
|
|
65
|
-
disableExtractFoundComponents?: boolean | string[];
|
|
66
|
-
evaluateVars?: boolean;
|
|
67
|
-
cssPath?: string;
|
|
68
|
-
cssData?: any;
|
|
69
|
-
deoptProps?: Set<string>;
|
|
70
|
-
excludeProps?: Set<string>;
|
|
71
|
-
inlineProps?: Set<string>;
|
|
72
|
-
forceExtractStyleDefinitions?: boolean;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=types.d.ts.map
|