@symbo.ls/cli 2.11.191 → 2.11.194
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 +13 -2
- package/bin/fetch.js +1 -2
- package/package.json +2 -2
package/bin/convert.js
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import chalk from 'chalk'
|
|
3
4
|
import { program } from './program.js'
|
|
4
|
-
import {
|
|
5
|
+
import { convert, convertDomqlModule } from '@symbo.ls/convert'
|
|
5
6
|
|
|
6
7
|
const TMP_DIR_NAME = '.smbls_convert_tmp'
|
|
7
8
|
|
|
9
|
+
export function convertFromCli (data, opts) {
|
|
10
|
+
const { framework, verbose, verboseCode } = opts
|
|
11
|
+
console.log(chalk.dim('\n----------------\n'))
|
|
12
|
+
console.log('Converting components to', chalk.bold(framework))
|
|
13
|
+
const convertedStrings = convertDomqlModule(data, null, framework)
|
|
14
|
+
if (verboseCode) console.log(convertedStrings)
|
|
15
|
+
console.log(chalk.bold.green('\nSuccessfully converted'))
|
|
16
|
+
return verbose
|
|
17
|
+
}
|
|
18
|
+
|
|
8
19
|
program
|
|
9
20
|
.command('convert')
|
|
10
21
|
.description('Convert and copy all DomQL components under a directory')
|
|
@@ -27,4 +38,4 @@ program
|
|
|
27
38
|
.option('--internal-uikit',
|
|
28
39
|
'(For internal use only). ' +
|
|
29
40
|
'Excludes particular components from the conversion')
|
|
30
|
-
.action(
|
|
41
|
+
.action(convert)
|
package/bin/fetch.js
CHANGED
|
@@ -5,11 +5,10 @@ import chalk from 'chalk'
|
|
|
5
5
|
import { loadModule } from './require.js'
|
|
6
6
|
import { program } from './program.js'
|
|
7
7
|
import * as fetch from '@symbo.ls/fetch'
|
|
8
|
-
|
|
9
8
|
import * as utils from '@domql/utils'
|
|
10
9
|
import { convertFromCli } from './convert.js'
|
|
11
|
-
const { isObjectLike } = utils.default
|
|
12
10
|
|
|
11
|
+
const { isObjectLike } = utils.default
|
|
13
12
|
const { fetchRemote } = fetch.default
|
|
14
13
|
|
|
15
14
|
const RC_PATH = process.cwd() + '/symbols.json'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.194",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@symbo.ls/convert": "latest"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a3cac5bdbabbf0860e278e7362d7326f9c9c075e"
|
|
31
31
|
}
|