@newlogic-digital/cli 0.0.6 → 0.0.9
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/index.mjs +10 -12
- package/package.json +2 -1
- package/src/commands/cms/index.mjs +2 -2
- package/src/utils.mjs +4 -4
package/index.mjs
CHANGED
|
@@ -30,18 +30,16 @@ if (!command) {
|
|
|
30
30
|
`)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const name = args[2]
|
|
33
|
+
if (command === 'init') {
|
|
34
|
+
const action = args[1]
|
|
35
|
+
const name = args[2]
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
await init(action, name)
|
|
38
|
+
}
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
if (command === 'cms') {
|
|
41
|
+
const action = args[1]
|
|
42
|
+
const name = args[2]
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})()
|
|
44
|
+
await cms(action, name)
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@ import { join, resolve } from 'path'
|
|
|
6
6
|
export const options = {
|
|
7
7
|
path: {
|
|
8
8
|
src: {
|
|
9
|
-
templates: resolve(process.cwd(), '
|
|
10
|
-
sections: resolve(process.cwd(), '
|
|
9
|
+
templates: resolve(process.cwd(), 'src/templates'),
|
|
10
|
+
sections: resolve(process.cwd(), 'src/templates/Sections')
|
|
11
11
|
},
|
|
12
12
|
app: {
|
|
13
13
|
templates: resolve(process.cwd(), 'app/Templates'),
|
package/src/utils.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import childProcess from 'child_process'
|
|
2
|
+
import fs from 'fs'
|
|
3
|
+
import { dirname, resolve } from 'path'
|
|
4
|
+
import { fileURLToPath } from 'url'
|
|
2
5
|
|
|
3
|
-
const { version, name } =
|
|
4
|
-
version: '0.0.5',
|
|
5
|
-
name: '@newlogic-digital/cli'
|
|
6
|
-
}
|
|
6
|
+
const { version, name } = JSON.parse(fs.readFileSync(resolve(dirname((fileURLToPath(import.meta.url))), '../package.json')).toString())
|
|
7
7
|
|
|
8
8
|
const execSync = (cmd) => {
|
|
9
9
|
try {
|