devextreme-cli 1.3.0 → 1.3.1
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/package.json +2 -2
- package/src/applications/application.react.js +2 -0
- package/src/applications/application.vue.js +7 -8
- package/src/templates/vue-v2/application/src/router.js +3 -3
- package/src/templates/vue-v2/sample-pages/{home.vue → home-page.vue} +0 -0
- package/src/templates/vue-v2/sample-pages/{profile.vue → profile-page.vue} +0 -0
- package/src/templates/vue-v2/sample-pages/{tasks.vue → tasks-page.vue} +0 -0
- package/src/templates/vue-v3/application/src/router.js +4 -4
- package/src/templates/vue-v3/sample-pages/{home.vue → home-page.vue} +0 -0
- package/src/templates/vue-v3/sample-pages/{profile.vue → profile-page.vue} +0 -0
- package/src/templates/vue-v3/sample-pages/{tasks.vue → tasks-page.vue} +0 -0
- package/src/utility/run-command.js +5 -2
- package/src/.DS_Store +0 -0
- package/src/templates/.DS_Store +0 -0
- package/src/templates/vue-v2/.DS_Store +0 -0
- package/src/templates/vue-v2/application/.DS_Store +0 -0
- package/src/templates/vue-v2/application/src/.DS_Store +0 -0
- package/src/templates/vue-v3/.DS_Store +0 -0
- package/src/templates/vue-v3/application/.DS_Store +0 -0
- package/src/templates/vue-v3/application/src/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devextreme-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "DevExtreme CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devexpress",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"tree-kill-promise": "^1.0.3",
|
|
70
70
|
"typescript": "^4.0.2"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "4f9873f14724ac858b6d0e73bacc124c147a7eb5"
|
|
73
73
|
}
|
|
@@ -21,6 +21,8 @@ const preparePackageJsonForTemplate = (appPath, appName) => {
|
|
|
21
21
|
const dependencies = [
|
|
22
22
|
{ name: 'sass', version: '^1.34.1' },
|
|
23
23
|
{ name: 'devextreme-cli', version: latestVersions['devextreme-cli'], dev: true },
|
|
24
|
+
{ name: 'react', version: '^17.0.0' },
|
|
25
|
+
{ name: 'react-dom', version: '^17.0.0' },
|
|
24
26
|
{ name: 'react-router-dom', version: '^5.0.0' },
|
|
25
27
|
];
|
|
26
28
|
const scripts = [
|
|
@@ -14,7 +14,7 @@ const defaultStyles = [
|
|
|
14
14
|
'devextreme/dist/css/dx.light.css',
|
|
15
15
|
'devextreme/dist/css/dx.common.css'
|
|
16
16
|
];
|
|
17
|
-
const defaultVueVersion = '
|
|
17
|
+
const defaultVueVersion = 'v3';
|
|
18
18
|
|
|
19
19
|
const getVueVersion = () => {
|
|
20
20
|
const devextremeConfig = require('../utility/devextreme-config').read();
|
|
@@ -56,14 +56,13 @@ const preparePackageJsonForTemplate = (appPath, appName, version) => {
|
|
|
56
56
|
async function createVueApp(name, version) {
|
|
57
57
|
const argList = ['-p', '@vue/cli', 'vue', 'create', name];
|
|
58
58
|
|
|
59
|
-
if(version ===
|
|
60
|
-
argList.push('
|
|
59
|
+
if(version === 'v2') {
|
|
60
|
+
argList.push('-p "Default (Vue 2)"');
|
|
61
61
|
} else {
|
|
62
|
-
argList.push('-p');
|
|
63
|
-
argList.push('__default_vue_3__');
|
|
62
|
+
argList.push('-p "Default (Vue 3)"');
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
return runCommand('npx', argList);
|
|
65
|
+
return runCommand('npx', argList, { windowsVerbatimArguments: false });
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
const create = async(appName, options) => {
|
|
@@ -155,11 +154,11 @@ const getVueRoute = (viewName, componentName, pagePath, version) => {
|
|
|
155
154
|
const path = `path: "/${pagePath}"`;
|
|
156
155
|
const name = `name: "${stringUtils.dasherize(viewName)}"`;
|
|
157
156
|
|
|
158
|
-
const metaPart = version ===
|
|
157
|
+
const metaPart = version === 'v2'
|
|
159
158
|
? 'meta: { requiresAuth: true }'
|
|
160
159
|
: 'meta: {\n requiresAuth: true,\n layout: defaultLayout\n }';
|
|
161
160
|
|
|
162
|
-
const componentPart = version ===
|
|
161
|
+
const componentPart = version === 'v2'
|
|
163
162
|
? `components:\n {\n layout: defaultLayout,\n content: ${componentName}\n }`
|
|
164
163
|
: `component: ${componentName}`;
|
|
165
164
|
|
|
@@ -3,9 +3,9 @@ import Router from "vue-router";
|
|
|
3
3
|
|
|
4
4
|
import auth from "./auth";
|
|
5
5
|
|
|
6
|
-
<%=^empty%>import Home from "./views/home";
|
|
7
|
-
import Profile from "./views/profile";
|
|
8
|
-
import Tasks from "./views/tasks";
|
|
6
|
+
<%=^empty%>import Home from "./views/home-page";
|
|
7
|
+
import Profile from "./views/profile-page";
|
|
8
|
+
import Tasks from "./views/tasks-page";
|
|
9
9
|
<%=/empty%>import defaultLayout from "./layouts/<%=layout%>";
|
|
10
10
|
import simpleLayout from "./layouts/single-card";
|
|
11
11
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import auth from "./auth";
|
|
2
2
|
import { createRouter, createWebHashHistory } from "vue-router";
|
|
3
3
|
|
|
4
|
-
<%=^empty%>import Home from "./views/home";
|
|
5
|
-
import Profile from "./views/profile";
|
|
6
|
-
import Tasks from "./views/tasks";
|
|
4
|
+
<%=^empty%>import Home from "./views/home-page";
|
|
5
|
+
import Profile from "./views/profile-page";
|
|
6
|
+
import Tasks from "./views/tasks-page";
|
|
7
7
|
<%=/empty%>import defaultLayout from "./layouts/<%=layout%>";
|
|
8
8
|
import simpleLayout from "./layouts/single-card";
|
|
9
9
|
|
|
@@ -40,7 +40,7 @@ const router = new createRouter({
|
|
|
40
40
|
{
|
|
41
41
|
path: "/tasks",
|
|
42
42
|
name: "tasks",
|
|
43
|
-
meta: {
|
|
43
|
+
meta: {
|
|
44
44
|
requiresAuth: true,
|
|
45
45
|
layout: defaultLayout
|
|
46
46
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
const spawn = require('child_process').spawn;
|
|
2
2
|
|
|
3
|
+
const isWin = /^win/.test(process.platform);
|
|
4
|
+
|
|
3
5
|
module.exports = function(commandName, args = [], customConfig = {}) {
|
|
4
6
|
const forceNoCmd = customConfig.forceNoCmd;
|
|
5
|
-
const command =
|
|
7
|
+
const command = isWin && !forceNoCmd ? `${commandName}.cmd` : commandName;
|
|
6
8
|
const config = {
|
|
7
9
|
stdio: 'inherit',
|
|
8
|
-
windowsVerbatimArguments: true
|
|
10
|
+
windowsVerbatimArguments: true,
|
|
11
|
+
shell: isWin ? false : true
|
|
9
12
|
};
|
|
10
13
|
|
|
11
14
|
if(customConfig) {
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/templates/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|