@vc-shell/create-vc-app 1.0.88
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/CHANGELOG.md +93 -0
- package/README.md +30 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +152 -0
- package/dist/template/base/.browserslistrc +3 -0
- package/dist/template/base/.commitlintrc.json +3 -0
- package/dist/template/base/.editorconfig +22 -0
- package/dist/template/base/.env.ejs +5 -0
- package/dist/template/base/.eslintignore +3 -0
- package/dist/template/base/.eslintrc.js +40 -0
- package/dist/template/base/.husky/commit-msg +4 -0
- package/dist/template/base/.husky/pre-commit +4 -0
- package/dist/template/base/.prettierignore +4 -0
- package/dist/template/base/.prettierrc +4 -0
- package/dist/template/base/.vscode/extensions.json +16 -0
- package/dist/template/base/.vscode/settings.json +13 -0
- package/dist/template/base/LICENSE +12 -0
- package/dist/template/base/README.md +54 -0
- package/dist/template/base/index.html.ejs +26 -0
- package/dist/template/base/package.json.ejs +72 -0
- package/dist/template/base/postcss.config.js +6 -0
- package/dist/template/base/public/assets/1.jpg +0 -0
- package/dist/template/base/public/assets/2.jpg +0 -0
- package/dist/template/base/public/assets/3.jpg +0 -0
- package/dist/template/base/public/assets/4.jpg +0 -0
- package/dist/template/base/public/assets/5.jpg +0 -0
- package/dist/template/base/public/assets/6.jpg +0 -0
- package/dist/template/base/public/assets/7.jpg +0 -0
- package/dist/template/base/public/assets/8.jpg +0 -0
- package/dist/template/base/public/assets/9.jpg +0 -0
- package/dist/template/base/public/assets/app-select.svg +11 -0
- package/dist/template/base/public/assets/avatar.jpg +0 -0
- package/dist/template/base/public/assets/background.jpg +0 -0
- package/dist/template/base/public/assets/empty.png +0 -0
- package/dist/template/base/public/assets/logo-white.svg +21 -0
- package/dist/template/base/public/assets/logo.svg +8 -0
- package/dist/template/base/public/img/icons/apple-touch-icon.png +0 -0
- package/dist/template/base/public/img/icons/favicon-16x16.png +0 -0
- package/dist/template/base/public/img/icons/favicon-32x32.png +0 -0
- package/dist/template/base/public/img/icons/favicon.ico +0 -0
- package/dist/template/base/public/img/icons/mstile-150x150.png +0 -0
- package/dist/template/base/public/img/icons/pwa-192x192.png +0 -0
- package/dist/template/base/public/img/icons/pwa-512x512.png +0 -0
- package/dist/template/base/public/img/icons/safari-pinned-tab.svg +37 -0
- package/dist/template/base/src/api_client/README.md +28 -0
- package/dist/template/base/src/env.d.ts +9 -0
- package/dist/template/base/src/locales/en.json +23 -0
- package/dist/template/base/src/locales/index.ts +2 -0
- package/dist/template/base/src/main.ts.ejs +41 -0
- package/dist/template/base/src/pages/App.vue.ejs +373 -0
- package/dist/template/base/src/router/index.ts.ejs +134 -0
- package/dist/template/base/src/shims-vue.d.ts +24 -0
- package/dist/template/base/src/styles/index.scss +3 -0
- package/dist/template/base/src/types/index.ts +43 -0
- package/dist/template/base/tailwind.config.js +7 -0
- package/dist/template/base/tsconfig.json +37 -0
- package/dist/template/base/vite.config.ts.ejs +47 -0
- package/dist/template/code/blade/src/modules/default/components/index.ts +1 -0
- package/dist/template/code/blade/src/modules/default/composables/index.ts +1 -0
- package/dist/template/code/blade/src/modules/default/composables/useDefault/index.ts +9 -0
- package/dist/template/code/blade/src/modules/default/index.ts +9 -0
- package/dist/template/code/blade/src/modules/default/locales/en.json.ejs +40 -0
- package/dist/template/code/blade/src/modules/default/locales/index.ts +2 -0
- package/dist/template/code/blade/src/modules/default/pages/default-list.vue.ejs +197 -0
- package/dist/template/code/blade/src/modules/default/pages/index.ts +1 -0
- package/dist/template/code/commonPages/src/composables/index.ts +1 -0
- package/dist/template/code/commonPages/src/composables/useLogin/index.ts +16 -0
- package/dist/template/code/dashboard/src/pages/Dashboard.vue +38 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
## [1.0.88](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.87...v1.0.88) (2023-06-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## [1.0.87](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.86...v1.0.87) (2023-06-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [1.0.86](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.85...v1.0.86) (2023-06-23)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [1.0.85](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.84...v1.0.85) (2023-06-23)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* check permissions plugin ([cc65272](https://github.com/VirtoCommerce/vc-shell/commit/cc65272d933e29f427b1403df2bdd627b15dd1e6))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [1.0.84](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.83...v1.0.84) (2023-06-23)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [1.0.83](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.82...v1.0.83) (2023-06-23)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [1.0.82](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.81...v1.0.82) (2023-06-23)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [1.0.81](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.80...v1.0.81) (2023-06-23)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [1.0.80](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.79...v1.0.80) (2023-06-22)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [1.0.79](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.78...v1.0.79) (2023-06-22)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [1.0.78](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.77...v1.0.78) (2023-06-22)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [1.0.77](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.76...v1.0.77) (2023-06-22)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [1.0.76](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.75...v1.0.76) (2023-06-22)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## [1.0.75](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.74...v1.0.75) (2023-06-21)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [1.0.74](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.73...v1.0.74) (2023-06-21)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* pass platformUrl to shell ([6265790](https://github.com/VirtoCommerce/vc-shell/commit/62657901ae6738883ed785e4f54507db85ba7d66))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [1.0.73](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.72...v1.0.73) (2023-06-08)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## [1.0.72](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.71...v1.0.72) (2023-06-07)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## [1.0.71](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.70...v1.0.71) (2023-06-02)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Bug Fixes
|
|
83
|
+
|
|
84
|
+
* fixed create-vc-app template ([f433fea](https://github.com/VirtoCommerce/vc-shell/commit/f433feaf4b75badeea427b61061a08b9a6056c8a))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
* **cli** create-vc-app scaffolding tool ([e6428ae](https://github.com/VirtoCommerce/vc-shell/commit/e6428ae654ba180971c6ab58f9abfa2452ca0e9b))
|
|
90
|
+
* azure active directory signin ([46cee05](https://github.com/VirtoCommerce/vc-shell/commit/46cee052064434bdd143d744ca7557f5c0fd7e84))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Creating your first application
|
|
2
|
+
|
|
3
|
+
Make sure you have executed `yarn` command and your current working directory is the one where you intend to create a project.
|
|
4
|
+
|
|
5
|
+
Run following command:
|
|
6
|
+
```bash
|
|
7
|
+
$ npx create-vc-app
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
This command will execute application scaffolding tool. You will be presented with prompts:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
✔ App name: … <your-app-name>
|
|
14
|
+
✔ Add Dashboard page? … No / Yes
|
|
15
|
+
✔ Add Login/Invite/Reset password pages? … No / Yes
|
|
16
|
+
✔ Add module starter? … No / Yes
|
|
17
|
+
✔ Module starter name: … <your-first-module-name>
|
|
18
|
+
|
|
19
|
+
Scaffolding app in ./<your-app-name>...
|
|
20
|
+
|
|
21
|
+
Done.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Once app is created, follow the instructions to install dependencies and start dev server:
|
|
26
|
+
```bash
|
|
27
|
+
$ cd <your-app-name>
|
|
28
|
+
$ yarn
|
|
29
|
+
$ yarn serve
|
|
30
|
+
```
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const prompts_1 = tslib_1.__importDefault(require("prompts"));
|
|
6
|
+
const minimist_1 = tslib_1.__importDefault(require("minimist"));
|
|
7
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
8
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
10
|
+
const ejs = tslib_1.__importStar(require("ejs"));
|
|
11
|
+
function isValidName(appName) {
|
|
12
|
+
return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(appName);
|
|
13
|
+
}
|
|
14
|
+
function toValidName(appName) {
|
|
15
|
+
return appName
|
|
16
|
+
.trim()
|
|
17
|
+
.toLowerCase()
|
|
18
|
+
.replace(/\s+/g, "-")
|
|
19
|
+
.replace(/^[._]/, "")
|
|
20
|
+
.replace(/[^a-z0-9-~]+/g, "-");
|
|
21
|
+
}
|
|
22
|
+
function emptyDir(dir) {
|
|
23
|
+
if (!fs_1.default.existsSync(dir)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function renderTemplate(src, dest, config) {
|
|
28
|
+
const stats = fs_1.default.statSync(src);
|
|
29
|
+
if (stats.isDirectory()) {
|
|
30
|
+
if (path_1.default.basename(src) === "node_modules") {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
fs_1.default.mkdirSync(dest, { recursive: true });
|
|
34
|
+
for (const file of fs_1.default.readdirSync(src)) {
|
|
35
|
+
if (path_1.default.parse(file).ext === ".ejs") {
|
|
36
|
+
try {
|
|
37
|
+
const rendered = await ejs.renderFile(path_1.default.resolve(src, file), config);
|
|
38
|
+
fs_1.default.writeFileSync(path_1.default.resolve(`${dest}/${path_1.default.parse(file).name}`), rendered);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
console.log(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
renderTemplate(path_1.default.resolve(src, file), path_1.default.resolve(dest, file), config);
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (fs_1.default.existsSync(dest)) {
|
|
50
|
+
fs_1.default.writeFileSync(dest, fs_1.default.readFileSync(src, "utf8"));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
fs_1.default.copyFileSync(src, dest);
|
|
54
|
+
}
|
|
55
|
+
async function create() {
|
|
56
|
+
const cwd = process.cwd();
|
|
57
|
+
const args = (0, minimist_1.default)(process.argv.slice(2));
|
|
58
|
+
let dir = args._[0];
|
|
59
|
+
const defaultAppName = !dir ? "vc-app" : dir;
|
|
60
|
+
let config = {};
|
|
61
|
+
try {
|
|
62
|
+
config = await (0, prompts_1.default)([
|
|
63
|
+
{
|
|
64
|
+
name: "appName",
|
|
65
|
+
type: dir ? null : "text",
|
|
66
|
+
message: "App name:",
|
|
67
|
+
initial: defaultAppName,
|
|
68
|
+
onState: (state) => (dir = toValidName(String(state.value).trim()) || defaultAppName),
|
|
69
|
+
format: (value) => toValidName(String(value).trim()),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "packageName",
|
|
73
|
+
type: () => (isValidName(dir) ? null : "text"),
|
|
74
|
+
message: "Package name:",
|
|
75
|
+
initial: () => toValidName(dir),
|
|
76
|
+
validate: (dir) => isValidName(dir) || "Invalid package.json name",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "dashboard",
|
|
80
|
+
type: "toggle",
|
|
81
|
+
message: "Add Dashboard page?",
|
|
82
|
+
initial: false,
|
|
83
|
+
active: "Yes",
|
|
84
|
+
inactive: "No",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "commonPages",
|
|
88
|
+
type: "toggle",
|
|
89
|
+
message: "Add Login/Invite/Reset password pages?",
|
|
90
|
+
initial: false,
|
|
91
|
+
active: "Yes",
|
|
92
|
+
inactive: "No",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "bladeModuleStarter",
|
|
96
|
+
type: "toggle",
|
|
97
|
+
message: "Add module starter?",
|
|
98
|
+
initial: false,
|
|
99
|
+
active: "Yes",
|
|
100
|
+
inactive: "No",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "bladeModuleName",
|
|
104
|
+
type: (prev) => (prev ? "text" : null),
|
|
105
|
+
message: "Module starter name:",
|
|
106
|
+
format: (value) => String(value).trim().replace(/\s+/g, "").replace(/^[._]/, ""),
|
|
107
|
+
},
|
|
108
|
+
], {
|
|
109
|
+
onCancel: () => {
|
|
110
|
+
throw new Error(chalk_1.default.red("Creation cancelled"));
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
console.log(e.message);
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
const { dashboard, commonPages, bladeModuleStarter } = config;
|
|
119
|
+
const root = path_1.default.join(cwd, dir);
|
|
120
|
+
if (fs_1.default.existsSync(root)) {
|
|
121
|
+
emptyDir(root);
|
|
122
|
+
}
|
|
123
|
+
else if (!fs_1.default.existsSync(root)) {
|
|
124
|
+
fs_1.default.mkdirSync(root);
|
|
125
|
+
}
|
|
126
|
+
console.log(`\nScaffolding app in ${root}...`);
|
|
127
|
+
const templateRoot = path_1.default.resolve(__dirname, "template");
|
|
128
|
+
const render = (templateName) => {
|
|
129
|
+
const templateDir = path_1.default.resolve(templateRoot, templateName);
|
|
130
|
+
renderTemplate(templateDir, root, config);
|
|
131
|
+
};
|
|
132
|
+
render("base");
|
|
133
|
+
if (dashboard) {
|
|
134
|
+
render("code/dashboard");
|
|
135
|
+
}
|
|
136
|
+
if (commonPages) {
|
|
137
|
+
render("code/commonPages");
|
|
138
|
+
}
|
|
139
|
+
if (bladeModuleStarter) {
|
|
140
|
+
render("code/blade");
|
|
141
|
+
}
|
|
142
|
+
console.log(`\nDone. You can now run application:\n`);
|
|
143
|
+
if (root !== cwd) {
|
|
144
|
+
const cdProjectName = path_1.default.relative(cwd, root);
|
|
145
|
+
console.log(` ${chalk_1.default.bold(chalk_1.default.green(`cd ${cdProjectName.includes(" ") ? `"${cdProjectName}"` : cdProjectName}`))}`);
|
|
146
|
+
}
|
|
147
|
+
console.log(` ${chalk_1.default.bold(chalk_1.default.green("yarn"))}`);
|
|
148
|
+
console.log(` ${chalk_1.default.bold(chalk_1.default.green("yarn serve"))}`);
|
|
149
|
+
}
|
|
150
|
+
create().catch((e) => {
|
|
151
|
+
console.error(e);
|
|
152
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# top-most EditorConfig file
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
# Global rules, override on case-by-case basis
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
indent_style = space
|
|
8
|
+
max_line_length = 120
|
|
9
|
+
tab_width = 2
|
|
10
|
+
end_of_line = lf
|
|
11
|
+
insert_final_newline = true
|
|
12
|
+
trim_trailing_whitespace = true
|
|
13
|
+
|
|
14
|
+
[*.{vue,js,ts,scss}]
|
|
15
|
+
quote_type = double
|
|
16
|
+
|
|
17
|
+
[*.md]
|
|
18
|
+
max_line_length = off
|
|
19
|
+
trim_trailing_whitespace = false
|
|
20
|
+
|
|
21
|
+
[*.svg]
|
|
22
|
+
insert_final_newline = false
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
node: true,
|
|
5
|
+
},
|
|
6
|
+
plugins: ["@typescript-eslint", "vue", "import"],
|
|
7
|
+
extends: [
|
|
8
|
+
"plugin:vue/vue3-recommended",
|
|
9
|
+
"eslint:recommended",
|
|
10
|
+
"plugin:import/recommended",
|
|
11
|
+
"plugin:import/typescript",
|
|
12
|
+
"@vue/typescript/recommended",
|
|
13
|
+
"@vue/prettier",
|
|
14
|
+
"@vue/eslint-config-typescript/recommended",
|
|
15
|
+
],
|
|
16
|
+
parser: "vue-eslint-parser",
|
|
17
|
+
parserOptions: {
|
|
18
|
+
node: true,
|
|
19
|
+
},
|
|
20
|
+
settings: {
|
|
21
|
+
"import/parsers": {
|
|
22
|
+
"@typescript-eslint/parser": [".ts"],
|
|
23
|
+
},
|
|
24
|
+
"import/resolver": {
|
|
25
|
+
typescript: {
|
|
26
|
+
project: ["./tsconfig.json"],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
rules: {
|
|
31
|
+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
32
|
+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
33
|
+
"@typescript-eslint/ban-ts-comment": "warn",
|
|
34
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
35
|
+
"vue/multi-word-component-names": "off",
|
|
36
|
+
"vue/require-default-prop": "off",
|
|
37
|
+
"vue/no-v-html": "off",
|
|
38
|
+
"vue/no-template-shadow": "off",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
"editorconfig.editorconfig",
|
|
4
|
+
"dbaeumer.vscode-eslint",
|
|
5
|
+
"yzhang.markdown-all-in-one",
|
|
6
|
+
"shd101wyy.markdown-preview-enhanced",
|
|
7
|
+
"csstools.postcss",
|
|
8
|
+
"esbenp.prettier-vscode",
|
|
9
|
+
"bradlc.vscode-tailwindcss",
|
|
10
|
+
"vue.volar",
|
|
11
|
+
"lokalise.i18n-ally"
|
|
12
|
+
],
|
|
13
|
+
"unwantedRecommendations": [
|
|
14
|
+
"octref.vetur"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) Virto Solutions LTD. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Licensed under the Virto Commerce Open Software License (the "License"); you
|
|
4
|
+
may not use this file except in compliance with the License. You may
|
|
5
|
+
obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
https://virtocommerce.com/open-source-license
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
implied.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# VirtoCommerce Vue3 Frontend for specialized back-office applications
|
|
2
|
+
|
|
3
|
+
## Technologies used
|
|
4
|
+
|
|
5
|
+
- **Vue3.** Progressive frontend framework with its key features allows to build fast applications.
|
|
6
|
+
- **Typescript.** All components and composables have type definitions, so IDE can help you to build clean and working code.
|
|
7
|
+
- **TailwindCSS.** The most popular and growing CSS framework providing wonderful flexible structure to speed up styling.
|
|
8
|
+
- **Husky + ESLint + Prettier.** Autoformat, check and fix your code and prevent ugly codestyle within repository.
|
|
9
|
+
- **Vite.** It is faster than Webpack. Really FASTER. Use it to develop with HMR benefits and to build for production.
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
├─ public // Static assets
|
|
15
|
+
│ ├─ assets // Static images used inside the application.
|
|
16
|
+
│ └─ img
|
|
17
|
+
│ └─ icons // Icons used for favicons, PWA, etc.
|
|
18
|
+
├─ src
|
|
19
|
+
│ ├─ api_client // Generated API clients folder
|
|
20
|
+
│ │ └─...
|
|
21
|
+
│ ├─ components // Universal Vue components
|
|
22
|
+
│ │ └─...
|
|
23
|
+
│ ├─ config // Application extras config files
|
|
24
|
+
│ │ └─ push-hub.ts // SignalR config file
|
|
25
|
+
│ ├─ locales // Locale files used to provide translated content
|
|
26
|
+
│ │ └─ en.json
|
|
27
|
+
│ ├─ modules // The collection of custom modules
|
|
28
|
+
│ │ └─ ... // Module folder
|
|
29
|
+
│ │ ├─ components // The collection of components specific for this module
|
|
30
|
+
│ │ ├─ composables // The collection of shared logic written using Composable API pattern.
|
|
31
|
+
│ │ ├─ locales // Locale files used to provide translated content specific for this module
|
|
32
|
+
│ │ ├─ pages // Set of module pages used within Application router
|
|
33
|
+
│ │ └─ index.ts // Module entry point
|
|
34
|
+
│ ├─ pages // Set of application pages used within Application router.
|
|
35
|
+
│ │ └─...
|
|
36
|
+
│ ├─ router // SPA routing configuration
|
|
37
|
+
│ │ └─...
|
|
38
|
+
│ ├─ styles // Extras application style files
|
|
39
|
+
│ │ └─ index.scss // Tailwind initialization file
|
|
40
|
+
│ └─ types // Typescript .d.ts files
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Getting started
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# install and configure package dependencies and git hooks
|
|
47
|
+
$ yarn
|
|
48
|
+
|
|
49
|
+
# build application
|
|
50
|
+
$ yarn build
|
|
51
|
+
|
|
52
|
+
# start application with hot reload at localhost:8080
|
|
53
|
+
$ yarn serve
|
|
54
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
7
|
+
<meta name="viewport"
|
|
8
|
+
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
|
|
9
|
+
<link rel="icon" href="img/icons/favicon.ico">
|
|
10
|
+
<link rel="apple-touch-icon" sizes="180x180" href="img/icons/apple-touch-icon.png">
|
|
11
|
+
<link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png">
|
|
12
|
+
<link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png">
|
|
13
|
+
<meta name="theme-color" content="#ffffff">
|
|
14
|
+
<title><%= appName %></title>
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<noscript>
|
|
19
|
+
<strong>Please enable JavaScript to continue.</strong>
|
|
20
|
+
</noscript>
|
|
21
|
+
<div id="app"></div>
|
|
22
|
+
<script type="module" src="/src/main.ts"></script>
|
|
23
|
+
<!-- built files will be auto injected -->
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= appName %>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"postinstall": "husky install",
|
|
7
|
+
"serve": "cross-env APP_ENV=development vite --force",
|
|
8
|
+
"preview": "vite preview",
|
|
9
|
+
"build": "yarn build:app & yarn build:types",
|
|
10
|
+
"build:app": "cross-env APP_ENV=production vite build",
|
|
11
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly --outDir dist/types",
|
|
12
|
+
"type-check": "vue-tsc --noEmit",
|
|
13
|
+
"lint-staged": "lint-staged",
|
|
14
|
+
"generate-api-client": "cross-env api-client-generator --color",
|
|
15
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
|
16
|
+
"bump": "cross-env-shell 'f() { yarn version --\"$@\" --no-commit-hooks --ignore-scripts --no-git-tag-version --yes && yarn changelog && git add . && yarn commit-release && yarn create:tag ; }; f'",
|
|
17
|
+
"commit-release": "cross-env-shell 'git commit -m v$npm_package_version'",
|
|
18
|
+
"create:tag": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@commitlint/cli": "^17.6.3",
|
|
22
|
+
"@commitlint/config-conventional": "^17.6.3",
|
|
23
|
+
"@rollup/plugin-typescript": "^11.1.1",
|
|
24
|
+
"@types/lodash-es": "^4.17.7",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
26
|
+
"@typescript-eslint/parser": "^5.59.7",
|
|
27
|
+
"@vc-shell/api-client-generator": "^1.0.88",
|
|
28
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
29
|
+
"@vue/eslint-config-prettier": "^7.1.0",
|
|
30
|
+
"@vue/eslint-config-typescript": "^11.0.3",
|
|
31
|
+
"autoprefixer": "^10.4.14",
|
|
32
|
+
"buffer-esm": "^1.2.0",
|
|
33
|
+
"conventional-changelog-cli": "^2.2.2",
|
|
34
|
+
"cross-env": "^7.0.3",
|
|
35
|
+
"eslint": "^8.41.0",
|
|
36
|
+
"eslint-import-resolver-typescript": "^3.5.5",
|
|
37
|
+
"eslint-plugin-import": "^2.27.5",
|
|
38
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
39
|
+
"eslint-plugin-vue": "^9.14.1",
|
|
40
|
+
"husky": "^8.0.3",
|
|
41
|
+
"lint-staged": "^13.2.2",
|
|
42
|
+
"lodash-es": "^4.17.21",
|
|
43
|
+
"postcss": "^8.4.23",
|
|
44
|
+
"prettier": "^2.8.8",
|
|
45
|
+
"querystring-es3": "^0.2.1",
|
|
46
|
+
"sass": "^1.62.1",
|
|
47
|
+
"tailwindcss": "^3.3.2",
|
|
48
|
+
"typescript": "~5.0.4",
|
|
49
|
+
"vite": "^4.3.9",
|
|
50
|
+
"vite-plugin-checker": "^0.6.0",
|
|
51
|
+
"vite-plugin-mkcert": "^1.15.0",
|
|
52
|
+
"vite-plugin-pwa": "^0.14.7",
|
|
53
|
+
"vue-eslint-parser": "^9.3.0",
|
|
54
|
+
"vue-tsc": "~1.6.5"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@fortawesome/fontawesome-free": "^5.15.3",
|
|
58
|
+
"@vc-shell/config-generator": "^1.0.88",
|
|
59
|
+
"@vc-shell/framework": "^1.0.88",
|
|
60
|
+
"@vueuse/core": "^10.1.2",
|
|
61
|
+
"@vueuse/integrations": "^10.1.2",
|
|
62
|
+
"moment": "^2.29.4",
|
|
63
|
+
"roboto-fontface": "^0.10.0",
|
|
64
|
+
"vee-validate": "^4.9.4",
|
|
65
|
+
"vue": "^3.3.4",
|
|
66
|
+
"vue-router": "^4.2.1",
|
|
67
|
+
"yarn": "^1.22.19"
|
|
68
|
+
},
|
|
69
|
+
"lint-staged": {
|
|
70
|
+
"*.{js,ts,vue}": "eslint --fix"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="2.53846" cy="2.53846" r="2.53846" fill="#7E8E9D"/>
|
|
3
|
+
<ellipse cx="11" cy="2.53846" rx="2.53846" ry="2.53846" fill="#7E8E9D"/>
|
|
4
|
+
<ellipse cx="19.4616" cy="2.53846" rx="2.53846" ry="2.53846" fill="#7E8E9D"/>
|
|
5
|
+
<ellipse cx="2.53846" cy="11" rx="2.53846" ry="2.53846" fill="#7E8E9D"/>
|
|
6
|
+
<ellipse cx="2.53846" cy="19.4615" rx="2.53846" ry="2.53846" fill="#7E8E9D"/>
|
|
7
|
+
<circle cx="11" cy="11" r="2.53846" fill="#7E8E9D"/>
|
|
8
|
+
<circle cx="11" cy="19.4615" r="2.53846" fill="#7E8E9D"/>
|
|
9
|
+
<circle cx="19.4616" cy="11" r="2.53846" fill="#7E8E9D"/>
|
|
10
|
+
<circle cx="19.4616" cy="19.4615" r="2.53846" fill="#7E8E9D"/>
|
|
11
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|