frappe-ui 1.0.0-beta.5 → 1.0.0-beta.7
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/package.json
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frappe-ui",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.7",
|
|
4
4
|
"description": "A set of components and utilities for rapid UI development",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"sideEffects":
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.css",
|
|
8
|
+
"**/*.vue"
|
|
9
|
+
],
|
|
7
10
|
"imports": {
|
|
8
11
|
"#components/*": "./src/components/*",
|
|
9
12
|
"#molecules/*": "./src/molecules/*",
|
|
10
13
|
"#composables/*": "./src/composables/*",
|
|
11
14
|
"#utils/*": "./src/utils/*"
|
|
12
15
|
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"tokens-v2": "./tailwind/migrate-tokens-v2.js"
|
|
18
|
+
},
|
|
13
19
|
"scripts": {
|
|
14
20
|
"test": "vitest --run",
|
|
15
21
|
"test:coverage": "vitest --run --coverage",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
/**
|
|
2
3
|
* Espresso v2 token migration codemod.
|
|
3
4
|
*
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
* class, which carries the correct per-weight letter-spacing (see
|
|
14
15
|
* `mergeWeightClasses`).
|
|
15
16
|
*
|
|
16
|
-
* Usage:
|
|
17
|
+
* Usage: tokens-v2 [--dry-run] [--force] <dir-or-file...>
|
|
17
18
|
*
|
|
18
19
|
* IMPORTANT: the token replacement is single-pass/simultaneous. Several renames
|
|
19
20
|
* chain (outline red-2→3, red-3→4, red-4→5); applying them sequentially would
|
|
@@ -28,6 +29,8 @@ import fs from 'fs'
|
|
|
28
29
|
import path from 'path'
|
|
29
30
|
import { fileURLToPath } from 'url'
|
|
30
31
|
|
|
32
|
+
const USAGE = 'Usage: tokens-v2 [--dry-run] [--force] <dir-or-file...>'
|
|
33
|
+
|
|
31
34
|
// ---------- MAPPING ----------
|
|
32
35
|
|
|
33
36
|
// Per-category renames: old suffix → new suffix.
|
|
@@ -322,12 +325,18 @@ function* walk(target) {
|
|
|
322
325
|
|
|
323
326
|
function main() {
|
|
324
327
|
const args = process.argv.slice(2)
|
|
328
|
+
const help = args.includes('--help') || args.includes('-h')
|
|
325
329
|
const dryRun = args.includes('--dry-run')
|
|
326
330
|
const force = args.includes('--force')
|
|
327
331
|
const targets = args.filter((a) => !a.startsWith('--'))
|
|
328
332
|
|
|
333
|
+
if (help) {
|
|
334
|
+
console.log(USAGE)
|
|
335
|
+
return
|
|
336
|
+
}
|
|
337
|
+
|
|
329
338
|
if (targets.length === 0) {
|
|
330
|
-
console.error(
|
|
339
|
+
console.error(USAGE)
|
|
331
340
|
process.exit(1)
|
|
332
341
|
}
|
|
333
342
|
|
|
@@ -387,5 +396,7 @@ function main() {
|
|
|
387
396
|
}
|
|
388
397
|
}
|
|
389
398
|
|
|
390
|
-
const
|
|
399
|
+
const scriptPath = fileURLToPath(import.meta.url)
|
|
400
|
+
const invokedPath = process.argv[1]
|
|
401
|
+
const isCLI = invokedPath && fs.realpathSync(invokedPath) === fs.realpathSync(scriptPath)
|
|
391
402
|
if (isCLI) main()
|