@tinacms/scripts 0.0.0-20230801132607 → 0.0.0-20230809184936
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/{chunk-NYQD2IPW.js → chunk-FTLKP6WH.js} +2 -10
- package/dist/index.js +7 -288
- package/dist/jest-runner.js +2 -2
- package/package.json +2 -2
|
@@ -14,19 +14,11 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
19
|
-
}) : x)(function(x) {
|
|
20
|
-
if (typeof require !== "undefined")
|
|
21
|
-
return require.apply(this, arguments);
|
|
22
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
23
|
-
});
|
|
24
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
17
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
25
18
|
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
26
19
|
};
|
|
27
20
|
|
|
28
21
|
|
|
29
22
|
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
exports.__spreadValues = __spreadValues; exports.__require = __require; exports.__commonJS = __commonJS;
|
|
24
|
+
exports.__spreadValues = __spreadValues; exports.__commonJS = __commonJS;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var _chunkNYQD2IPWjs = require('./chunk-NYQD2IPW.js');
|
|
3
|
+
var _chunkFTLKP6WHjs = require('./chunk-FTLKP6WH.js');
|
|
5
4
|
|
|
6
5
|
// src/index.ts
|
|
7
6
|
var _vite = require('vite');
|
|
@@ -11,13 +10,9 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
11
10
|
var _chokidar = require('chokidar'); var _chokidar2 = _interopRequireDefault(_chokidar);
|
|
12
11
|
var _child_process = require('child_process');
|
|
13
12
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
14
|
-
var _tailwindcss = require('tailwindcss'); var _tailwindcss2 = _interopRequireDefault(_tailwindcss);
|
|
15
|
-
var _postcssnested = require('postcss-nested'); var _postcssnested2 = _interopRequireDefault(_postcssnested);
|
|
16
|
-
var _nesting = require('tailwindcss/nesting'); var _nesting2 = _interopRequireDefault(_nesting);
|
|
17
13
|
|
|
18
14
|
|
|
19
15
|
var _commander = require('commander');
|
|
20
|
-
var defaultTheme = _chunkNYQD2IPWjs.__require.call(void 0, "tailwindcss/defaultTheme");
|
|
21
16
|
var program = new (0, _commander.Command)("Tina Build");
|
|
22
17
|
var registerCommands = (commands, noHelp = false) => {
|
|
23
18
|
commands.forEach((command, i) => {
|
|
@@ -134,269 +129,12 @@ e.g: "forestry types:gen --help"
|
|
|
134
129
|
}
|
|
135
130
|
program.parse(args);
|
|
136
131
|
}
|
|
137
|
-
var config = (cwd = "") => {
|
|
138
|
-
return {
|
|
139
|
-
important: ".tina-tailwind",
|
|
140
|
-
theme: {
|
|
141
|
-
columns: {
|
|
142
|
-
auto: "auto",
|
|
143
|
-
1: "1",
|
|
144
|
-
2: "2",
|
|
145
|
-
3: "3",
|
|
146
|
-
4: "4",
|
|
147
|
-
5: "5",
|
|
148
|
-
6: "6",
|
|
149
|
-
7: "7",
|
|
150
|
-
8: "8",
|
|
151
|
-
9: "9",
|
|
152
|
-
10: "10",
|
|
153
|
-
11: "11",
|
|
154
|
-
12: "12",
|
|
155
|
-
"3xs": "256px",
|
|
156
|
-
"2xs": "288px",
|
|
157
|
-
xs: "320px",
|
|
158
|
-
sm: "384px",
|
|
159
|
-
md: "448px",
|
|
160
|
-
lg: "512px",
|
|
161
|
-
xl: "576px",
|
|
162
|
-
"2xl": "672px",
|
|
163
|
-
"3xl": "768px",
|
|
164
|
-
"4xl": "896px",
|
|
165
|
-
"5xl": "1024px",
|
|
166
|
-
"6xl": "1152px",
|
|
167
|
-
"7xl": "1280px"
|
|
168
|
-
},
|
|
169
|
-
spacing: {
|
|
170
|
-
px: "1px",
|
|
171
|
-
0: "0px",
|
|
172
|
-
0.5: "2px",
|
|
173
|
-
1: "4px",
|
|
174
|
-
1.5: "6px",
|
|
175
|
-
2: "8px",
|
|
176
|
-
2.5: "10px",
|
|
177
|
-
3: "12px",
|
|
178
|
-
3.5: "14px",
|
|
179
|
-
4: "16px",
|
|
180
|
-
4.5: "18px",
|
|
181
|
-
5: "20px",
|
|
182
|
-
6: "24px",
|
|
183
|
-
7: "28px",
|
|
184
|
-
8: "32px",
|
|
185
|
-
9: "36px",
|
|
186
|
-
10: "40px",
|
|
187
|
-
11: "44px",
|
|
188
|
-
12: "48px",
|
|
189
|
-
14: "56px",
|
|
190
|
-
16: "64px",
|
|
191
|
-
18: "72px",
|
|
192
|
-
20: "80px",
|
|
193
|
-
24: "96px",
|
|
194
|
-
28: "114px",
|
|
195
|
-
32: "128px",
|
|
196
|
-
36: "144px",
|
|
197
|
-
40: "160px",
|
|
198
|
-
44: "176px",
|
|
199
|
-
48: "192px",
|
|
200
|
-
52: "208px",
|
|
201
|
-
56: "224px",
|
|
202
|
-
60: "240px",
|
|
203
|
-
64: "256px",
|
|
204
|
-
72: "288px",
|
|
205
|
-
80: "320px",
|
|
206
|
-
96: "384px"
|
|
207
|
-
},
|
|
208
|
-
borderRadius: {
|
|
209
|
-
none: "0px",
|
|
210
|
-
sm: "2px",
|
|
211
|
-
DEFAULT: "4px",
|
|
212
|
-
md: "6px",
|
|
213
|
-
lg: "8px",
|
|
214
|
-
xl: "12px",
|
|
215
|
-
"2xl": "16px",
|
|
216
|
-
"3xl": "24px",
|
|
217
|
-
full: "9999px"
|
|
218
|
-
},
|
|
219
|
-
borderWidth: {
|
|
220
|
-
DEFAULT: "1px",
|
|
221
|
-
0: "0",
|
|
222
|
-
2: "2px",
|
|
223
|
-
3: "3px",
|
|
224
|
-
4: "4px",
|
|
225
|
-
6: "6px",
|
|
226
|
-
8: "8px"
|
|
227
|
-
},
|
|
228
|
-
fontSize: {
|
|
229
|
-
xs: ["13px", { lineHeight: "1.33" }],
|
|
230
|
-
sm: ["14px", { lineHeight: "1.43" }],
|
|
231
|
-
base: ["16px", { lineHeight: "1.5" }],
|
|
232
|
-
md: ["16px", { lineHeight: "1.5" }],
|
|
233
|
-
lg: ["18px", { lineHeight: "1.55" }],
|
|
234
|
-
xl: ["20px", { lineHeight: "1.4" }],
|
|
235
|
-
"2xl": ["24px", { lineHeight: "1.33" }],
|
|
236
|
-
"3xl": ["30px", { lineHeight: "1.2" }],
|
|
237
|
-
"4xl": ["36px", { lineHeight: "1.1" }],
|
|
238
|
-
"5xl": ["48px", { lineHeight: "1" }],
|
|
239
|
-
"6xl": ["60px", { lineHeight: "1" }],
|
|
240
|
-
"7xl": ["72px", { lineHeight: "1" }],
|
|
241
|
-
"8xl": ["96px", { lineHeight: "1" }],
|
|
242
|
-
"9xl": ["128px", { lineHeight: "1" }]
|
|
243
|
-
},
|
|
244
|
-
opacity: {
|
|
245
|
-
0: "0",
|
|
246
|
-
5: ".05",
|
|
247
|
-
7: ".07",
|
|
248
|
-
10: ".1",
|
|
249
|
-
15: ".15",
|
|
250
|
-
20: ".2",
|
|
251
|
-
25: ".25",
|
|
252
|
-
30: ".3",
|
|
253
|
-
40: ".4",
|
|
254
|
-
50: ".5",
|
|
255
|
-
60: ".6",
|
|
256
|
-
70: ".7",
|
|
257
|
-
75: ".75",
|
|
258
|
-
80: ".8",
|
|
259
|
-
90: ".9",
|
|
260
|
-
100: "1"
|
|
261
|
-
},
|
|
262
|
-
zIndex: {
|
|
263
|
-
"-1": -1,
|
|
264
|
-
base: 9e3,
|
|
265
|
-
panel: 9400,
|
|
266
|
-
menu: 9800,
|
|
267
|
-
chrome: 10200,
|
|
268
|
-
overlay: 10600,
|
|
269
|
-
modal: 10800,
|
|
270
|
-
"0": 0,
|
|
271
|
-
"10": 10,
|
|
272
|
-
"20": 20,
|
|
273
|
-
"30": 30,
|
|
274
|
-
"40": 40,
|
|
275
|
-
"25": 25,
|
|
276
|
-
"50": 50,
|
|
277
|
-
"75": 75,
|
|
278
|
-
"100": 100,
|
|
279
|
-
auto: "auto"
|
|
280
|
-
},
|
|
281
|
-
extend: {
|
|
282
|
-
keyframes: {
|
|
283
|
-
slideIn: {
|
|
284
|
-
"0%": {
|
|
285
|
-
opacity: "0",
|
|
286
|
-
transform: "translateY(-1rem)"
|
|
287
|
-
},
|
|
288
|
-
"100%": {
|
|
289
|
-
opacity: "1",
|
|
290
|
-
transform: "translateY(0)"
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
slideInLeft: {
|
|
294
|
-
"0%": {
|
|
295
|
-
opacity: "0",
|
|
296
|
-
transform: "translateX(2rem)"
|
|
297
|
-
},
|
|
298
|
-
"100%": {
|
|
299
|
-
opacity: "1",
|
|
300
|
-
transform: "translateX(0)"
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
animation: {
|
|
305
|
-
"slide-in": "slideIn 150ms ease-out 1 normal forwards",
|
|
306
|
-
"slide-in-left": "slideInLeft 150ms ease-out 1 normal forwards",
|
|
307
|
-
"spin-reverse": "spin 1s linear infinite reverse"
|
|
308
|
-
},
|
|
309
|
-
scale: {
|
|
310
|
-
97: ".97",
|
|
311
|
-
103: "1.03"
|
|
312
|
-
},
|
|
313
|
-
transitionDuration: {
|
|
314
|
-
0: "0ms",
|
|
315
|
-
2e3: "2000ms"
|
|
316
|
-
},
|
|
317
|
-
boxShadow: {
|
|
318
|
-
xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
|
|
319
|
-
outline: "0 0 0 3px rgba(66, 153, 225, 0.5)"
|
|
320
|
-
},
|
|
321
|
-
colors: {
|
|
322
|
-
blue: {
|
|
323
|
-
50: "#DCEEFF",
|
|
324
|
-
100: "#B4DBFF",
|
|
325
|
-
200: "#85C5FE",
|
|
326
|
-
300: "#4EABFE",
|
|
327
|
-
400: "#2296fe",
|
|
328
|
-
500: "#0084FF",
|
|
329
|
-
600: "#0574e4",
|
|
330
|
-
700: "#0D5DBD",
|
|
331
|
-
800: "#144696",
|
|
332
|
-
900: "#1D2C6C",
|
|
333
|
-
1e3: "#241748"
|
|
334
|
-
},
|
|
335
|
-
gray: {
|
|
336
|
-
50: "#F6F6F9",
|
|
337
|
-
100: "#EDECF3",
|
|
338
|
-
150: "#E6E3EF",
|
|
339
|
-
200: "#E1DDEC",
|
|
340
|
-
250: "#C9C5D5",
|
|
341
|
-
300: "#b2adbe",
|
|
342
|
-
400: "#918c9e",
|
|
343
|
-
500: "#716c7f",
|
|
344
|
-
600: "#565165",
|
|
345
|
-
700: "#433e52",
|
|
346
|
-
800: "#363145",
|
|
347
|
-
900: "#252336",
|
|
348
|
-
1e3: "#1c1b2e"
|
|
349
|
-
},
|
|
350
|
-
orange: {
|
|
351
|
-
400: "#EB6337",
|
|
352
|
-
500: "#EC4815",
|
|
353
|
-
600: "#DC4419"
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
fontFamily: {
|
|
357
|
-
sans: ["Inter", ...defaultTheme.fontFamily.sans]
|
|
358
|
-
},
|
|
359
|
-
lineHeight: {
|
|
360
|
-
3: "12px",
|
|
361
|
-
4: "16px",
|
|
362
|
-
5: "20px",
|
|
363
|
-
6: "24px",
|
|
364
|
-
7: "28px",
|
|
365
|
-
8: "32px",
|
|
366
|
-
9: "36px",
|
|
367
|
-
10: "40px"
|
|
368
|
-
},
|
|
369
|
-
maxWidth: {
|
|
370
|
-
form: "900px"
|
|
371
|
-
},
|
|
372
|
-
screens: {
|
|
373
|
-
xs: "320px",
|
|
374
|
-
sm: "560px",
|
|
375
|
-
md: "720px",
|
|
376
|
-
lg: "1030px"
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
content: [_path2.default.join(cwd, "src/**/*.{vue,js,ts,jsx,tsx,svelte}")],
|
|
381
|
-
plugins: [
|
|
382
|
-
_chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/container-queries"),
|
|
383
|
-
_chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/typography")({
|
|
384
|
-
className: "tina-prose"
|
|
385
|
-
}),
|
|
386
|
-
_chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/line-clamp"),
|
|
387
|
-
_chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/aspect-ratio")
|
|
388
|
-
],
|
|
389
|
-
corePlugins: {
|
|
390
|
-
preflight: false
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
};
|
|
394
132
|
var buildIt = async (entryPoint, packageJSON) => {
|
|
395
133
|
const entry = typeof entryPoint === "string" ? entryPoint : entryPoint.name;
|
|
396
134
|
const target = typeof entryPoint === "string" ? "browser" : entryPoint.target;
|
|
397
135
|
const deps = packageJSON.dependencies;
|
|
398
136
|
const peerDeps = packageJSON.peerDependencies;
|
|
399
|
-
const external = Object.keys(
|
|
137
|
+
const external = Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, deps), peerDeps));
|
|
400
138
|
const globals = {};
|
|
401
139
|
const out = (entry2) => {
|
|
402
140
|
const { dir, name } = _path2.default.parse(entry2);
|
|
@@ -439,7 +177,7 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
439
177
|
target: "node12",
|
|
440
178
|
format: "cjs",
|
|
441
179
|
outfile: _path2.default.join(process.cwd(), "dist", "index.js"),
|
|
442
|
-
external: Object.keys(
|
|
180
|
+
external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
|
|
443
181
|
});
|
|
444
182
|
await _esbuild.build.call(void 0, {
|
|
445
183
|
entryPoints: [_path2.default.join(process.cwd(), entry)],
|
|
@@ -448,7 +186,7 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
448
186
|
target: "es2020",
|
|
449
187
|
format: "esm",
|
|
450
188
|
outfile: _path2.default.join(process.cwd(), "dist", "index.mjs"),
|
|
451
|
-
external: Object.keys(
|
|
189
|
+
external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
|
|
452
190
|
});
|
|
453
191
|
await _esbuild.build.call(void 0, {
|
|
454
192
|
entryPoints: [_path2.default.join(process.cwd(), entry)],
|
|
@@ -457,7 +195,7 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
457
195
|
target: "es2020",
|
|
458
196
|
format: "esm",
|
|
459
197
|
outfile: _path2.default.join(process.cwd(), "dist", "index.browser.mjs"),
|
|
460
|
-
external: Object.keys(
|
|
198
|
+
external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
|
|
461
199
|
});
|
|
462
200
|
} else {
|
|
463
201
|
await _esbuild.build.call(void 0, {
|
|
@@ -474,25 +212,6 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
474
212
|
return true;
|
|
475
213
|
}
|
|
476
214
|
const defaultBuildConfig = {
|
|
477
|
-
plugins: [
|
|
478
|
-
{
|
|
479
|
-
name: "vite-plugin-tina",
|
|
480
|
-
config: (_, env) => {
|
|
481
|
-
const plugins = [];
|
|
482
|
-
const tw = _tailwindcss2.default.call(void 0, config(process.cwd()));
|
|
483
|
-
plugins.push(_nesting2.default);
|
|
484
|
-
plugins.push(_postcssnested2.default);
|
|
485
|
-
plugins.push(tw);
|
|
486
|
-
return {
|
|
487
|
-
css: {
|
|
488
|
-
postcss: {
|
|
489
|
-
plugins
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
],
|
|
496
215
|
resolve: {
|
|
497
216
|
alias: {
|
|
498
217
|
"@toolkit": _path2.default.resolve(process.cwd(), "src/toolkit"),
|
|
@@ -521,8 +240,8 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
521
240
|
}
|
|
522
241
|
}
|
|
523
242
|
};
|
|
524
|
-
const buildConfig = packageJSON.buildConfig ?
|
|
525
|
-
await _vite.build.call(void 0,
|
|
243
|
+
const buildConfig = packageJSON.buildConfig ? _chunkFTLKP6WHjs.__spreadValues.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, defaultBuildConfig), packageJSON.buildConfig) : defaultBuildConfig;
|
|
244
|
+
await _vite.build.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, buildConfig));
|
|
526
245
|
await _fsextra2.default.outputFileSync(_path2.default.join(outInfo.outdir, `${outInfo.outfile}.d.ts`), `export * from "${outInfo.relativeOutfile}"`);
|
|
527
246
|
return true;
|
|
528
247
|
};
|
package/dist/jest-runner.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFTLKP6WHjs = require('./chunk-FTLKP6WH.js');
|
|
4
4
|
|
|
5
5
|
// src/jest-runner.ts
|
|
6
6
|
var _jestplugin = require('@sucrase/jest-plugin'); var _jestplugin2 = _interopRequireDefault(_jestplugin);
|
|
7
|
-
var require_jest_runner =
|
|
7
|
+
var require_jest_runner = _chunkFTLKP6WHjs.__commonJS.call(void 0, {
|
|
8
8
|
"src/jest-runner.ts"(exports, module) {
|
|
9
9
|
var config = {
|
|
10
10
|
verbose: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/scripts",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20230809184936",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"@tailwindcss/container-queries": "^0.1.0",
|
|
21
21
|
"@tailwindcss/line-clamp": "^0.3.1",
|
|
22
22
|
"@tailwindcss/typography": "^0.5.0",
|
|
23
|
+
"@types/inquirer": "^6.5.0",
|
|
23
24
|
"chalk": "^4.1.1",
|
|
24
25
|
"chokidar": "^3.5.2",
|
|
25
26
|
"commander": "^7.2.0",
|
|
@@ -32,7 +33,6 @@
|
|
|
32
33
|
"meow": "^10.0.1",
|
|
33
34
|
"normalize-path": "^3.0.0",
|
|
34
35
|
"postcss": "^8.4.5",
|
|
35
|
-
"postcss-nested": "^5.0.6",
|
|
36
36
|
"tailwindcss": "^3.2.7",
|
|
37
37
|
"tsup": "^4.12.5",
|
|
38
38
|
"typescript": "^4.2.2",
|