@symbo.ls/cli 0.6.27 → 0.6.28
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/fetch.js +4 -4
- package/bin/init.js +20 -19
- package/bin/require.js +3 -3
- package/package.json +2 -2
package/bin/fetch.js
CHANGED
|
@@ -16,8 +16,8 @@ const DEFAULT_REMOTE_CONFIG_PATH = 'https://raw.githubusercontent.com/symbo-ls/c
|
|
|
16
16
|
const API_URL = 'https://api.symbols.app/' // eslint-disable-line
|
|
17
17
|
|
|
18
18
|
const pkg = loadModule(PACKAGE_PATH)
|
|
19
|
-
const rc_file = loadModule(RC_PATH)
|
|
20
|
-
const local_config = loadModule(LOCAL_CONFIG_PATH)
|
|
19
|
+
const rc_file = loadModule(RC_PATH) // eslint-disable-line
|
|
20
|
+
const local_config = loadModule(LOCAL_CONFIG_PATH) // eslint-disable-line
|
|
21
21
|
|
|
22
22
|
program
|
|
23
23
|
.version(pkg.version)
|
|
@@ -28,11 +28,11 @@ program
|
|
|
28
28
|
.option('--framework', 'Which Symbols to install (domql, react)')
|
|
29
29
|
.action(async (framework) => {
|
|
30
30
|
// const packageName = `@symbo.ls/${mode || 'uikit'}`
|
|
31
|
-
const packageName =
|
|
31
|
+
const packageName = 'smbls'
|
|
32
32
|
console.log('Adding', chalk.green.bold(packageName))
|
|
33
33
|
|
|
34
34
|
if (framework === 'domql' || rc_file.framework === 'domql') {
|
|
35
|
-
exec(
|
|
35
|
+
exec('yarn add domql@^1.15.26 --force', (error, stdout, stderr) => {
|
|
36
36
|
if (error) {
|
|
37
37
|
console.log(`error: ${error.message}`)
|
|
38
38
|
return
|
package/bin/init.js
CHANGED
|
@@ -5,25 +5,26 @@ import chalk from 'chalk'
|
|
|
5
5
|
import { program } from './program.js'
|
|
6
6
|
|
|
7
7
|
program
|
|
8
|
-
.command('init [
|
|
8
|
+
.command('init [name]')
|
|
9
9
|
.description('Initialize a repository')
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
.argument('<name>')
|
|
11
|
+
.option('--framework', 'Which Symbols to install (domql, react)')
|
|
12
|
+
.action(async (framework) => {
|
|
13
|
+
const packageName = `@symbo.ls/${framework || 'uikit'}`
|
|
14
|
+
console.log('Creating', chalk.green.bold(packageName))
|
|
14
15
|
|
|
15
|
-
exec(`
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
16
|
+
// exec(`git clone git@github.com:symbo-ls/starter-kit.git`, (error, stdout, stderr) => {
|
|
17
|
+
// if (error) {
|
|
18
|
+
// console.log(`error: ${error.message}`)
|
|
19
|
+
// return
|
|
20
|
+
// }
|
|
21
|
+
// if (stderr) {
|
|
22
|
+
// console.warn(`stderr: ${stderr}`)
|
|
23
|
+
// return
|
|
24
|
+
// }
|
|
25
|
+
// console.log(`stdout: ${stdout}`)
|
|
26
|
+
// console.log(chalk.green.bold(packageName), 'successfuly added!')
|
|
27
|
+
// console.log('')
|
|
28
|
+
// console.log(chalk.dim.underline('Now you can import components like:'), `import { Button } from "${chalk.green.bold(packageName)}""`)
|
|
29
|
+
// })
|
|
29
30
|
})
|
package/bin/require.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { createRequire } from 'module'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const require = createRequire(import.meta.url)
|
|
3
|
+
class ImportError extends Error {} // Bring in the ability to create the 'require' method
|
|
4
|
+
const require = createRequire(import.meta.url) // construct the require method
|
|
5
5
|
|
|
6
6
|
export const loadModule = async (modulePath) => {
|
|
7
7
|
return require(modulePath) // use the require method
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.28",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@symbo.ls/init": "latest",
|
|
20
20
|
"@symbo.ls/socket": "latest",
|
|
21
21
|
"chalk": "^5.0.0",
|
|
22
|
-
"commander": "^
|
|
22
|
+
"commander": "^9.4.1",
|
|
23
23
|
"node-fetch": "^3.1.0",
|
|
24
24
|
"v8-compile-cache": "^2.3.0"
|
|
25
25
|
},
|