@symbo.ls/cli 2.11.162 → 2.11.165
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/bin/convert.js +2 -4
- package/bin/fetch.js +4 -2
- package/bin/index.js +1 -0
- package/bin/link-packages.js +94 -0
- package/bin/sync.js +4 -3
- package/package.json +2 -2
- package/bin/link-all.js +0 -10
package/bin/convert.js
CHANGED
|
@@ -272,8 +272,7 @@ async function convertFile (srcPath, tmpDirPath, destPath,
|
|
|
272
272
|
|
|
273
273
|
// Aborts copying if destination exists
|
|
274
274
|
function recursiveCopy (src, dst, exclude) {
|
|
275
|
-
if (exclude && exclude.includes(src))
|
|
276
|
-
return
|
|
275
|
+
if (exclude && exclude.includes(src)) { return }
|
|
277
276
|
|
|
278
277
|
if (!fs.existsSync(src)) {
|
|
279
278
|
console.error(`Error (recursiveCopy): Source file '${src}' does not exist.`)
|
|
@@ -293,8 +292,7 @@ function recursiveCopy (src, dst, exclude) {
|
|
|
293
292
|
mkdirp(dst)
|
|
294
293
|
const files = fs.readdirSync(src)
|
|
295
294
|
for (const f of files) {
|
|
296
|
-
if (exclude && exclude.includes(f))
|
|
297
|
-
continue
|
|
295
|
+
if (exclude && exclude.includes(f)) { continue }
|
|
298
296
|
|
|
299
297
|
recursiveCopy(path.join(src, f), path.join(dst, f), exclude)
|
|
300
298
|
}
|
package/bin/fetch.js
CHANGED
|
@@ -31,7 +31,7 @@ try {
|
|
|
31
31
|
} catch (e) { console.error('Please include symbols.json to your root of respository') }
|
|
32
32
|
|
|
33
33
|
export const fetchFromCli = async (opts) => {
|
|
34
|
-
const { dev, verbose, prettify } = opts
|
|
34
|
+
const { dev, verbose, prettify, convert: convertOpt } = opts
|
|
35
35
|
|
|
36
36
|
await rc.then(async data => {
|
|
37
37
|
const { key, framework } = data
|
|
@@ -102,7 +102,8 @@ export const fetchFromCli = async (opts) => {
|
|
|
102
102
|
else console.log(debugMsg)
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
console.log(convertOpt)
|
|
106
|
+
if (body.components && convertOpt && framework) {
|
|
106
107
|
convertFromCli(body.components, { ...opts, framework })
|
|
107
108
|
}
|
|
108
109
|
})
|
|
@@ -113,5 +114,6 @@ program
|
|
|
113
114
|
.description('Fetch symbols')
|
|
114
115
|
.option('-d, --dev', 'Running from local server')
|
|
115
116
|
.option('-v, --verbose', 'Verbose errors and warnings')
|
|
117
|
+
.option('--convert', 'Verbose errors and warnings', true)
|
|
116
118
|
.option('--verbose-code', 'Verbose errors and warnings')
|
|
117
119
|
.action(fetchFromCli)
|
package/bin/index.js
CHANGED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execSync } from 'child_process'
|
|
4
|
+
import { program } from './program.js'
|
|
5
|
+
|
|
6
|
+
const packagesToLink = [
|
|
7
|
+
'attrs-in-props',
|
|
8
|
+
'@symbo.ls/cli',
|
|
9
|
+
'@symbo.ls/create',
|
|
10
|
+
'@symbo.ls/convert',
|
|
11
|
+
'css-in-props',
|
|
12
|
+
'@symbo.ls/default-config',
|
|
13
|
+
'@symbo.ls/emotion',
|
|
14
|
+
'@symbo.ls/fetch',
|
|
15
|
+
'@symbo.ls/init',
|
|
16
|
+
'smbls',
|
|
17
|
+
'@symbo.ls/scratch',
|
|
18
|
+
'@symbo.ls/socket-ui',
|
|
19
|
+
'@symbo.ls/socket',
|
|
20
|
+
'@symbo.ls/utils',
|
|
21
|
+
'@symbo.ls/uikit',
|
|
22
|
+
'@symbo.ls/react',
|
|
23
|
+
'@symbo.ls/atoms',
|
|
24
|
+
'@symbo.ls/avatar',
|
|
25
|
+
'@symbo.ls/box',
|
|
26
|
+
'@symbo.ls/board',
|
|
27
|
+
'@symbo.ls/button',
|
|
28
|
+
'@symbo.ls/chat',
|
|
29
|
+
'@symbo.ls/card',
|
|
30
|
+
'@symbo.ls/checkbox',
|
|
31
|
+
'@symbo.ls/datepicker',
|
|
32
|
+
'@symbo.ls/dialog',
|
|
33
|
+
'@symbo.ls/dropdown',
|
|
34
|
+
'@symbo.ls/editorjs',
|
|
35
|
+
'@symbo.ls/doublehr',
|
|
36
|
+
'@symbo.ls/field',
|
|
37
|
+
'@symbo.ls/form',
|
|
38
|
+
'@symbo.ls/google-maps',
|
|
39
|
+
'@symbo.ls/helmet',
|
|
40
|
+
'@symbo.ls/icon',
|
|
41
|
+
'@symbo.ls/indicator',
|
|
42
|
+
'@symbo.ls/input',
|
|
43
|
+
'@symbo.ls/label',
|
|
44
|
+
'@symbo.ls/link',
|
|
45
|
+
'@symbo.ls/list',
|
|
46
|
+
'@symbo.ls/markdown',
|
|
47
|
+
'@symbo.ls/modal',
|
|
48
|
+
'@symbo.ls/notification',
|
|
49
|
+
'@symbo.ls/paragraphbutton',
|
|
50
|
+
'@symbo.ls/range',
|
|
51
|
+
'@symbo.ls/progress',
|
|
52
|
+
'@symbo.ls/pills',
|
|
53
|
+
'@symbo.ls/select',
|
|
54
|
+
'@symbo.ls/sidebar',
|
|
55
|
+
'@symbo.ls/slider',
|
|
56
|
+
'@symbo.ls/sociallink',
|
|
57
|
+
'@symbo.ls/steps',
|
|
58
|
+
'@symbo.ls/tab',
|
|
59
|
+
'@symbo.ls/table',
|
|
60
|
+
'@symbo.ls/titleparagraph',
|
|
61
|
+
'@symbo.ls/timepicker',
|
|
62
|
+
'@symbo.ls/threejs',
|
|
63
|
+
'@symbo.ls/unitvalue',
|
|
64
|
+
'@symbo.ls/tooltip',
|
|
65
|
+
'@symbo.ls/upload',
|
|
66
|
+
'@symbo.ls/user',
|
|
67
|
+
'@symbo.ls/video',
|
|
68
|
+
'@symbo.ls/default-icons',
|
|
69
|
+
'@symbo.ls/feather-icons',
|
|
70
|
+
'@symbo.ls/fluent-icons',
|
|
71
|
+
'@symbo.ls/material-icons',
|
|
72
|
+
'@symbo.ls/react-atoms',
|
|
73
|
+
'@symbo.ls/react-box',
|
|
74
|
+
'@symbo.ls/react-button',
|
|
75
|
+
'@symbo.ls/react-icon',
|
|
76
|
+
'@symbo.ls/react-provider',
|
|
77
|
+
'@symbo.ls/react-tooltip'
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
program
|
|
81
|
+
.command('link-packages')
|
|
82
|
+
.description('Run "yarn link" on specified packages')
|
|
83
|
+
.action(() => {
|
|
84
|
+
try {
|
|
85
|
+
for (const packageName of packagesToLink) {
|
|
86
|
+
console.log(`Linking ${packageName}...`)
|
|
87
|
+
execSync(`yarn link ${packageName}`, { stdio: 'inherit' })
|
|
88
|
+
}
|
|
89
|
+
console.log('All packages linked successfully.')
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error('Error linking packages:', error.message)
|
|
92
|
+
process.exit(1)
|
|
93
|
+
}
|
|
94
|
+
})
|
package/bin/sync.js
CHANGED
|
@@ -27,11 +27,12 @@ program
|
|
|
27
27
|
.option('-v, --verbose', 'Verbose errors and warnings')
|
|
28
28
|
.option('-k, --key', 'Bypass the symbols.json key, overriding the key manually')
|
|
29
29
|
.option('-f, --fetch', 'Verbose errors and warnings', true)
|
|
30
|
+
.option('--convert', 'Verbose errors and warnings', true)
|
|
30
31
|
.option('--verbose-code', 'Verbose errors and warnings')
|
|
31
32
|
.action(async (opts) => {
|
|
32
|
-
const { dev, verbose, fetch:
|
|
33
|
+
const { dev, verbose, fetch: fetchOpt, convert: convertOpt } = opts
|
|
33
34
|
|
|
34
|
-
if (
|
|
35
|
+
if (fetchOpt) {
|
|
35
36
|
await fetchFromCli(opts)
|
|
36
37
|
console.log(chalk.dim('\n----------------\n'))
|
|
37
38
|
}
|
|
@@ -90,7 +91,7 @@ program
|
|
|
90
91
|
updateDynamycFile(d, { framework, ...options })
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
if (d.components && framework) {
|
|
94
|
+
if (d.components && convertOpt && framework) {
|
|
94
95
|
convertFromCli(d.components, {
|
|
95
96
|
...options, framework
|
|
96
97
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.165",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"node-fetch": "^3.1.0",
|
|
26
26
|
"v8-compile-cache": "^2.3.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "2301d67cd5a700d9ffc81146518cbf228cf20383"
|
|
29
29
|
}
|