cc-core-cli 1.0.75 → 1.0.76
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/README.md
CHANGED
package/bin/index.js
CHANGED
|
@@ -23,8 +23,8 @@ if (action === 'init') {
|
|
|
23
23
|
const project = options['_'][1] || '.'
|
|
24
24
|
const path = options['_'][2] || '.'
|
|
25
25
|
|
|
26
|
-
if (!['core', 'admin', 'module'].includes(project)) {
|
|
27
|
-
console.log('Project should be one of [core|admin|module]!')
|
|
26
|
+
if (!['core', 'admin', 'module', 'admin_module'].includes(project)) {
|
|
27
|
+
console.log('Project should be one of [core|admin|module|admin_module]!')
|
|
28
28
|
return false
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -65,7 +65,7 @@ if (action === 'upgrade') {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const spinner = ora('(1/2) Copying files!').start();
|
|
68
|
-
const IGNORE_FILES = ['src/modules','docker-compose.yml','Dockerfile','package.json','version.json','README.md','custom.less', '.env.develop','_env','_gitignore','_npmrc'];
|
|
68
|
+
const IGNORE_FILES = ['src/modules', 'docker-compose.yml', 'Dockerfile', 'package.json', 'version.json', 'README.md', 'custom.less', '.env.develop', '_env', '_gitignore', '_npmrc'];
|
|
69
69
|
fs.copySync(`${__dirname}/../template/${project}`, '.', {
|
|
70
70
|
recursive: true,
|
|
71
71
|
filter: (name) => {
|
package/package.json
CHANGED
|
@@ -6,5 +6,8 @@ import "slick-carousel/slick/slick.css";
|
|
|
6
6
|
import "slick-carousel/slick/slick-theme.css";
|
|
7
7
|
|
|
8
8
|
import { CustomApp } from '@shopstack/cc-admin-lib'
|
|
9
|
+
import { importCustomModules } from '@shopstack/cc-admin-lib';
|
|
10
|
+
|
|
11
|
+
importCustomModules()
|
|
9
12
|
|
|
10
13
|
export default CustomApp
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
|
|
3
|
+
const DemoComponent = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div>
|
|
6
|
+
{'Demo Component'}
|
|
7
|
+
</div>
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const SettingDemoComponent = () => {
|
|
12
|
+
return (
|
|
13
|
+
<div>Setting</div>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const name = "demo"
|
|
18
|
+
|
|
19
|
+
export const label = 'Demo'
|
|
20
|
+
|
|
21
|
+
export const settings = SettingDemoComponent
|
|
22
|
+
|
|
23
|
+
export const options = {
|
|
24
|
+
field_type: 'string',
|
|
25
|
+
allow_trigger: true,
|
|
26
|
+
allow_filter: true,
|
|
27
|
+
allow_display_permission: true
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
DemoComponent.propsType = {
|
|
31
|
+
data: PropTypes.object,
|
|
32
|
+
disabled: PropTypes.bool,
|
|
33
|
+
schema: PropTypes.object,
|
|
34
|
+
relatedSchema: PropTypes.array
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
SettingDemoComponent.propsType = {}
|
|
38
|
+
|
|
39
|
+
export default DemoComponent
|