@zeedhi/teknisa-cli 1.107.1 → 1.108.0
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/LICENSE +21 -21
- package/README.md +5 -5
- package/bin/teknisa.js +117 -117
- package/package.json +2 -2
- package/src/create.js +118 -118
- package/src/generate.js +20 -20
- package/src/util/component/createEmptyComponent.js +145 -145
- package/src/util/component/createJest.js +19 -19
- package/src/util/component/createNpmignore.js +14 -14
- package/src/util/component/createPackage.js +52 -52
- package/src/util/component/createReadme.js +15 -15
- package/src/util/component/createRollup.js +15 -15
- package/src/util/component/createTsConfig.js +24 -24
- package/src/util/component/createTsLint.js +18 -18
- package/src/util/component/run.js +54 -54
- package/src/util/enhanceErrorMessages.js +13 -13
- package/src/util/project/editCliVersion.js +17 -17
- package/src/util/project/editPackageJson.js +19 -19
- package/src/util/project/module/.env.development +1 -1
- package/src/util/project/module/.env.production +1 -1
- package/src/util/project/module/.eslintrc.js +40 -40
- package/src/util/project/module/GruntFile.js +15 -15
- package/src/util/project/module/README.md +22 -22
- package/src/util/project/module/cliVersion.json +2 -2
- package/src/util/project/module/gitignore.template +21 -21
- package/src/util/project/module/package.json +68 -68
- package/src/util/project/module/postcss.config.js +5 -5
- package/src/util/project/module/public/index.html +17 -17
- package/src/util/project/module/public/metadata/notfound.json +14 -14
- package/src/util/project/module/public/metadata/unauthorized.json +14 -14
- package/src/util/project/module/public/robots.txt +2 -2
- package/src/util/project/module/src/App.vue +134 -134
- package/src/util/project/module/src/config/config.ts +17 -17
- package/src/util/project/module/src/config/devEnvironment.json +4 -4
- package/src/util/project/module/src/config/prodEnvironment.json +3 -3
- package/src/util/project/module/src/controllers/AppController.ts +5 -5
- package/src/util/project/module/src/controllers/index.ts +5 -5
- package/src/util/project/module/src/main.ts +17 -17
- package/src/util/project/module/src/plugins/index.ts +6 -6
- package/src/util/project/module/src/plugins/vuetify.ts +11 -11
- package/src/util/project/module/src/plugins/zeedhi.ts +50 -50
- package/src/util/project/module/src/registerServiceWorker.ts +32 -32
- package/src/util/project/module/src/shims-tsx.d.ts +13 -13
- package/src/util/project/module/src/shims-vue.d.ts +5 -5
- package/src/util/project/module/src/theme/index.ts +12 -12
- package/src/util/project/module/tsconfig.json +45 -45
- package/src/util/project/module/vue.config.js +107 -107
- package/src/util/project/product/.env.development +3 -3
- package/src/util/project/product/.env.production +2 -2
- package/src/util/project/product/.eslintrc.js +41 -41
- package/src/util/project/product/GruntFile.js +15 -15
- package/src/util/project/product/README.md +22 -22
- package/src/util/project/product/cliVersion.json +2 -2
- package/src/util/project/product/gitignore.template +21 -21
- package/src/util/project/product/package.json +69 -69
- package/src/util/project/product/postcss.config.js +5 -5
- package/src/util/project/product/public/assets/img/icons/safari-pinned-tab.svg +33 -33
- package/src/util/project/product/public/assets/img/image-not-found.svg +3 -3
- package/src/util/project/product/public/index.html +19 -19
- package/src/util/project/product/public/metadata/home.json +63 -63
- package/src/util/project/product/public/metadata/login.json +6 -6
- package/src/util/project/product/public/metadata/menu.json +28 -28
- package/src/util/project/product/public/metadata/notfound.json +14 -14
- package/src/util/project/product/public/robots.txt +2 -2
- package/src/util/project/product/src/App.vue +192 -192
- package/src/util/project/product/src/components/img-link/ImgLink.ts +17 -17
- package/src/util/project/product/src/components/img-link/ImgLink.vue +7 -7
- package/src/util/project/product/src/components/img-link/common/ImgLink.ts +32 -32
- package/src/util/project/product/src/components/index.ts +4 -4
- package/src/util/project/product/src/config/config.ts +22 -22
- package/src/util/project/product/src/config/devEnvironment.json +22 -22
- package/src/util/project/product/src/config/prodEnvironment.json +22 -22
- package/src/util/project/product/src/controllers/AppController.ts +119 -119
- package/src/util/project/product/src/controllers/LoginController.ts +17 -17
- package/src/util/project/product/src/controllers/index.ts +7 -7
- package/src/util/project/product/src/main.ts +22 -22
- package/src/util/project/product/src/plugins/index.ts +11 -11
- package/src/util/project/product/src/plugins/vuetify.ts +11 -11
- package/src/util/project/product/src/plugins/zeedhi.ts +72 -72
- package/src/util/project/product/src/registerServiceWorker.ts +32 -32
- package/src/util/project/product/src/router/index.ts +76 -76
- package/src/util/project/product/src/router/routes.ts +37 -37
- package/src/util/project/product/src/shims-tsx.d.ts +13 -13
- package/src/util/project/product/src/shims-vue.d.ts +5 -5
- package/src/util/project/product/src/store.ts +26 -26
- package/src/util/project/product/src/theme/index.ts +10 -10
- package/src/util/project/product/src/views/Microservice.ts +57 -57
- package/src/util/project/product/src/views/Microservice.vue +13 -13
- package/src/util/project/product/tsconfig.json +46 -46
- package/src/util/project/product/vue.config.js +107 -107
- package/src/util/project/renameGitIgnore.js +14 -14
- package/src/util/project/run.js +15 -15
- package/src/util/validateName.js +21 -21
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const colorTheme = localStorage.getItem('MODULES_THEME_COLOR') || '#2d68c3';
|
|
2
|
-
|
|
3
|
-
const theme = {
|
|
4
|
-
colors: {
|
|
5
|
-
light: {
|
|
6
|
-
primary: colorTheme,
|
|
7
|
-
anchor: colorTheme,
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default theme;
|
|
1
|
+
const colorTheme = localStorage.getItem('MODULES_THEME_COLOR') || '#2d68c3';
|
|
2
|
+
|
|
3
|
+
const theme = {
|
|
4
|
+
colors: {
|
|
5
|
+
light: {
|
|
6
|
+
primary: colorTheme,
|
|
7
|
+
anchor: colorTheme,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default theme;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es6",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"jsx": "preserve",
|
|
7
|
-
"importHelpers": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"experimentalDecorators": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"baseUrl": ".",
|
|
15
|
-
"typeRoots": [
|
|
16
|
-
"./node_modules/@types",
|
|
17
|
-
"./node_modules/vuetify/types"
|
|
18
|
-
],
|
|
19
|
-
"types": [
|
|
20
|
-
"webpack-env",
|
|
21
|
-
"jest",
|
|
22
|
-
"vuetify"
|
|
23
|
-
],
|
|
24
|
-
"paths": {
|
|
25
|
-
"@/*": [
|
|
26
|
-
"src/*"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"lib": [
|
|
30
|
-
"esnext",
|
|
31
|
-
"dom",
|
|
32
|
-
"dom.iterable",
|
|
33
|
-
"scripthost"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"include": [
|
|
37
|
-
"src/**/*.ts",
|
|
38
|
-
"src/**/*.tsx",
|
|
39
|
-
"src/**/*.vue",
|
|
40
|
-
"tests/**/*.ts",
|
|
41
|
-
"tests/**/*.tsx"
|
|
42
|
-
],
|
|
43
|
-
"exclude": [
|
|
44
|
-
"node_modules"
|
|
45
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es6",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"baseUrl": ".",
|
|
15
|
+
"typeRoots": [
|
|
16
|
+
"./node_modules/@types",
|
|
17
|
+
"./node_modules/vuetify/types"
|
|
18
|
+
],
|
|
19
|
+
"types": [
|
|
20
|
+
"webpack-env",
|
|
21
|
+
"jest",
|
|
22
|
+
"vuetify"
|
|
23
|
+
],
|
|
24
|
+
"paths": {
|
|
25
|
+
"@/*": [
|
|
26
|
+
"src/*"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"lib": [
|
|
30
|
+
"esnext",
|
|
31
|
+
"dom",
|
|
32
|
+
"dom.iterable",
|
|
33
|
+
"scripthost"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"include": [
|
|
37
|
+
"src/**/*.ts",
|
|
38
|
+
"src/**/*.tsx",
|
|
39
|
+
"src/**/*.vue",
|
|
40
|
+
"tests/**/*.ts",
|
|
41
|
+
"tests/**/*.tsx"
|
|
42
|
+
],
|
|
43
|
+
"exclude": [
|
|
44
|
+
"node_modules"
|
|
45
|
+
]
|
|
46
46
|
}
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
filenameHashing: true,
|
|
3
|
-
productionSourceMap: process.env.VUE_APP_DEBUG_SOURCEMAP === 'TRUE' ? true : false,
|
|
4
|
-
assetsDir: './assets',
|
|
5
|
-
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
6
|
-
devServer: {
|
|
7
|
-
port: process.env.VUE_APP_DEV_SERVER_PORT
|
|
8
|
-
},
|
|
9
|
-
chainWebpack: (config) => {
|
|
10
|
-
config.resolve.symlinks(false);
|
|
11
|
-
|
|
12
|
-
config.plugin('html').tap(args => {
|
|
13
|
-
args[0].chunksSortMode = (chunk1, chunk2) => {
|
|
14
|
-
const chunksOrder = {
|
|
15
|
-
'assets/css/src.components': 1,
|
|
16
|
-
'assets/css/app': 2,
|
|
17
|
-
'assets/css/styles': 3,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const getChunkOrder = (chunkName) => {
|
|
21
|
-
let order = 0;
|
|
22
|
-
Object.keys(chunksOrder).forEach(key => {
|
|
23
|
-
if (chunkName.indexOf(key) === 0) {
|
|
24
|
-
order = chunksOrder[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return order;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return getChunkOrder(chunk1.files[0]) - getChunkOrder(chunk2.files[0]);
|
|
31
|
-
};
|
|
32
|
-
return args;
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
/*remove hash from images*/
|
|
36
|
-
config.module
|
|
37
|
-
.rule('images')
|
|
38
|
-
.test(/\.(avif|png|jpe?g|gif)(\?.*)?$/)
|
|
39
|
-
.use('url-loader')
|
|
40
|
-
.loader('url-loader')
|
|
41
|
-
.options({
|
|
42
|
-
name : 'assets/img/[name].[ext]'
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
runtimeCompiler: true,
|
|
46
|
-
configureWebpack: {
|
|
47
|
-
module: {
|
|
48
|
-
rules: [
|
|
49
|
-
{
|
|
50
|
-
test: /\.js$/,
|
|
51
|
-
loader: 'babel-loader',
|
|
52
|
-
exclude: /node_modules/,
|
|
53
|
-
options: {
|
|
54
|
-
plugins: [
|
|
55
|
-
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
56
|
-
'@babel/plugin-proposal-class-properties',
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
optimization: {
|
|
63
|
-
splitChunks: {
|
|
64
|
-
chunks: 'all',
|
|
65
|
-
maxAsyncRequests: 5,
|
|
66
|
-
maxInitialRequests: Infinity,
|
|
67
|
-
minSize: 20000,
|
|
68
|
-
maxSize: 500000,
|
|
69
|
-
name: true,
|
|
70
|
-
cacheGroups: {
|
|
71
|
-
vendor: {
|
|
72
|
-
test: /[\\/]node_modules[\\/]/,
|
|
73
|
-
name(module) {
|
|
74
|
-
let packageName = module.context.match(
|
|
75
|
-
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
|
|
76
|
-
);
|
|
77
|
-
if (packageName[1] === '@zeedhi') {
|
|
78
|
-
packageName = module.context.match(
|
|
79
|
-
/[\\/]node_modules[\\/](.*?)[\\/](.*?)([\\/]|$)/
|
|
80
|
-
);
|
|
81
|
-
return `npm.${packageName[1].replace('@', '')}.${
|
|
82
|
-
packageName[2]
|
|
83
|
-
}`;
|
|
84
|
-
} else {
|
|
85
|
-
return `npm.${packageName[1].replace('@', '')}`;
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
src: {
|
|
90
|
-
test: /[\\/]src[\\/](controllers|components)[\\/]/,
|
|
91
|
-
name(module) {
|
|
92
|
-
let packageName = module.context.match(/[\\/]src[\\/](.*?)([\\/]|$)/);
|
|
93
|
-
if (module.context.indexOf('node_modules') === -1 && packageName)
|
|
94
|
-
return `src.${packageName[1]}`;
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
styles: {
|
|
98
|
-
test: /\.css$/,
|
|
99
|
-
name: 'styles',
|
|
100
|
-
chunks: 'all',
|
|
101
|
-
enforce: true,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
filenameHashing: true,
|
|
3
|
+
productionSourceMap: process.env.VUE_APP_DEBUG_SOURCEMAP === 'TRUE' ? true : false,
|
|
4
|
+
assetsDir: './assets',
|
|
5
|
+
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
6
|
+
devServer: {
|
|
7
|
+
port: process.env.VUE_APP_DEV_SERVER_PORT
|
|
8
|
+
},
|
|
9
|
+
chainWebpack: (config) => {
|
|
10
|
+
config.resolve.symlinks(false);
|
|
11
|
+
|
|
12
|
+
config.plugin('html').tap(args => {
|
|
13
|
+
args[0].chunksSortMode = (chunk1, chunk2) => {
|
|
14
|
+
const chunksOrder = {
|
|
15
|
+
'assets/css/src.components': 1,
|
|
16
|
+
'assets/css/app': 2,
|
|
17
|
+
'assets/css/styles': 3,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const getChunkOrder = (chunkName) => {
|
|
21
|
+
let order = 0;
|
|
22
|
+
Object.keys(chunksOrder).forEach(key => {
|
|
23
|
+
if (chunkName.indexOf(key) === 0) {
|
|
24
|
+
order = chunksOrder[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return order;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return getChunkOrder(chunk1.files[0]) - getChunkOrder(chunk2.files[0]);
|
|
31
|
+
};
|
|
32
|
+
return args;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/*remove hash from images*/
|
|
36
|
+
config.module
|
|
37
|
+
.rule('images')
|
|
38
|
+
.test(/\.(avif|png|jpe?g|gif)(\?.*)?$/)
|
|
39
|
+
.use('url-loader')
|
|
40
|
+
.loader('url-loader')
|
|
41
|
+
.options({
|
|
42
|
+
name : 'assets/img/[name].[ext]'
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
runtimeCompiler: true,
|
|
46
|
+
configureWebpack: {
|
|
47
|
+
module: {
|
|
48
|
+
rules: [
|
|
49
|
+
{
|
|
50
|
+
test: /\.js$/,
|
|
51
|
+
loader: 'babel-loader',
|
|
52
|
+
exclude: /node_modules/,
|
|
53
|
+
options: {
|
|
54
|
+
plugins: [
|
|
55
|
+
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
56
|
+
'@babel/plugin-proposal-class-properties',
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
optimization: {
|
|
63
|
+
splitChunks: {
|
|
64
|
+
chunks: 'all',
|
|
65
|
+
maxAsyncRequests: 5,
|
|
66
|
+
maxInitialRequests: Infinity,
|
|
67
|
+
minSize: 20000,
|
|
68
|
+
maxSize: 500000,
|
|
69
|
+
name: true,
|
|
70
|
+
cacheGroups: {
|
|
71
|
+
vendor: {
|
|
72
|
+
test: /[\\/]node_modules[\\/]/,
|
|
73
|
+
name(module) {
|
|
74
|
+
let packageName = module.context.match(
|
|
75
|
+
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
|
|
76
|
+
);
|
|
77
|
+
if (packageName[1] === '@zeedhi') {
|
|
78
|
+
packageName = module.context.match(
|
|
79
|
+
/[\\/]node_modules[\\/](.*?)[\\/](.*?)([\\/]|$)/
|
|
80
|
+
);
|
|
81
|
+
return `npm.${packageName[1].replace('@', '')}.${
|
|
82
|
+
packageName[2]
|
|
83
|
+
}`;
|
|
84
|
+
} else {
|
|
85
|
+
return `npm.${packageName[1].replace('@', '')}`;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
src: {
|
|
90
|
+
test: /[\\/]src[\\/](controllers|components)[\\/]/,
|
|
91
|
+
name(module) {
|
|
92
|
+
let packageName = module.context.match(/[\\/]src[\\/](.*?)([\\/]|$)/);
|
|
93
|
+
if (module.context.indexOf('node_modules') === -1 && packageName)
|
|
94
|
+
return `src.${packageName[1]}`;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
styles: {
|
|
98
|
+
test: /\.css$/,
|
|
99
|
+
name: 'styles',
|
|
100
|
+
chunks: 'all',
|
|
101
|
+
enforce: true,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
VUE_APP_PUBLIC_PATH=/
|
|
2
|
-
VUE_APP_DEV_SERVER_PORT=8080
|
|
3
|
-
VUE_APP_META_CONTENT_SECURITY_POLICY=
|
|
1
|
+
VUE_APP_PUBLIC_PATH=/
|
|
2
|
+
VUE_APP_DEV_SERVER_PORT=8080
|
|
3
|
+
VUE_APP_META_CONTENT_SECURITY_POLICY=
|
|
4
4
|
VUE_APP_UPGRADE_INSECURE_REQUESTS=
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
VUE_APP_PUBLIC_PATH=/
|
|
2
|
-
VUE_APP_META_CONTENT_SECURITY_POLICY=<>VUE_APP_META_CONTENT_SECURITY_POLICY<>
|
|
1
|
+
VUE_APP_PUBLIC_PATH=/
|
|
2
|
+
VUE_APP_META_CONTENT_SECURITY_POLICY=<>VUE_APP_META_CONTENT_SECURITY_POLICY<>
|
|
3
3
|
VUE_APP_UPGRADE_INSECURE_REQUESTS=<>VUE_APP_UPGRADE_INSECURE_REQUESTS<>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
es6: true,
|
|
6
|
-
node: true,
|
|
7
|
-
},
|
|
8
|
-
ignorePatterns: ['node_modules/', '**/coverage/*', '**/dist/*', '**/types/*', '**/__mocks__/*', '**/*.d.ts', '**/*.js'],
|
|
9
|
-
parser: 'vue-eslint-parser',
|
|
10
|
-
parserOptions: {
|
|
11
|
-
parser: '@typescript-eslint/parser',
|
|
12
|
-
extraFileExtensions: ['.vue'],
|
|
13
|
-
project: './tsconfig.json',
|
|
14
|
-
},
|
|
15
|
-
plugins: [
|
|
16
|
-
'@typescript-eslint',
|
|
17
|
-
],
|
|
18
|
-
extends: [
|
|
19
|
-
'airbnb-typescript/base',
|
|
20
|
-
],
|
|
21
|
-
rules: {
|
|
22
|
-
// maximum line length
|
|
23
|
-
'max-len': ['error', { code: 125, tabWidth: 2 }],
|
|
24
|
-
// disallow console.log, allow console.warn and console.error
|
|
25
|
-
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
26
|
-
// allow functions to be used before their definition
|
|
27
|
-
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
|
|
28
|
-
// don't check classes are exported using default when there is only one export
|
|
29
|
-
'import/prefer-default-export': 'off',
|
|
30
|
-
// allow changes in properties of parameters
|
|
31
|
-
'no-param-reassign': ['error', { props: false }],
|
|
32
|
-
// allow circular import references,
|
|
33
|
-
'import/no-cycle': 'off',
|
|
34
|
-
// allow class methos without this
|
|
35
|
-
'class-methods-use-this': 'off',
|
|
36
|
-
// ignore error caused by monorepo and path aliases
|
|
37
|
-
'import/no-unresolved': 'off',
|
|
38
|
-
// ignore enforcement of consistent linebreak style
|
|
39
|
-
'linebreak-style': 0,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
browser: true,
|
|
5
|
+
es6: true,
|
|
6
|
+
node: true,
|
|
7
|
+
},
|
|
8
|
+
ignorePatterns: ['node_modules/', '**/coverage/*', '**/dist/*', '**/types/*', '**/__mocks__/*', '**/*.d.ts', '**/*.js'],
|
|
9
|
+
parser: 'vue-eslint-parser',
|
|
10
|
+
parserOptions: {
|
|
11
|
+
parser: '@typescript-eslint/parser',
|
|
12
|
+
extraFileExtensions: ['.vue'],
|
|
13
|
+
project: './tsconfig.json',
|
|
14
|
+
},
|
|
15
|
+
plugins: [
|
|
16
|
+
'@typescript-eslint',
|
|
17
|
+
],
|
|
18
|
+
extends: [
|
|
19
|
+
'airbnb-typescript/base',
|
|
20
|
+
],
|
|
21
|
+
rules: {
|
|
22
|
+
// maximum line length
|
|
23
|
+
'max-len': ['error', { code: 125, tabWidth: 2 }],
|
|
24
|
+
// disallow console.log, allow console.warn and console.error
|
|
25
|
+
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
26
|
+
// allow functions to be used before their definition
|
|
27
|
+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
|
|
28
|
+
// don't check classes are exported using default when there is only one export
|
|
29
|
+
'import/prefer-default-export': 'off',
|
|
30
|
+
// allow changes in properties of parameters
|
|
31
|
+
'no-param-reassign': ['error', { props: false }],
|
|
32
|
+
// allow circular import references,
|
|
33
|
+
'import/no-cycle': 'off',
|
|
34
|
+
// allow class methos without this
|
|
35
|
+
'class-methods-use-this': 'off',
|
|
36
|
+
// ignore error caused by monorepo and path aliases
|
|
37
|
+
'import/no-unresolved': 'off',
|
|
38
|
+
// ignore enforcement of consistent linebreak style
|
|
39
|
+
'linebreak-style': 0,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
module.exports = function(grunt){
|
|
2
|
-
grunt.initConfig({
|
|
3
|
-
zhIdGenerator: {
|
|
4
|
-
options: {
|
|
5
|
-
jsonPath: ['../'],
|
|
6
|
-
menuPath: ["../menu.json"],
|
|
7
|
-
replaceIds: false
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
grunt.loadNpmTasks('grunt-zh-id-generator');
|
|
13
|
-
|
|
14
|
-
grunt.registerTask('default', ['zhIdGenerator']);
|
|
15
|
-
};
|
|
1
|
+
module.exports = function(grunt){
|
|
2
|
+
grunt.initConfig({
|
|
3
|
+
zhIdGenerator: {
|
|
4
|
+
options: {
|
|
5
|
+
jsonPath: ['../'],
|
|
6
|
+
menuPath: ["../menu.json"],
|
|
7
|
+
replaceIds: false
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
grunt.loadNpmTasks('grunt-zh-id-generator');
|
|
13
|
+
|
|
14
|
+
grunt.registerTask('default', ['zhIdGenerator']);
|
|
15
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
## Project setup
|
|
2
|
-
```
|
|
3
|
-
npm install
|
|
4
|
-
```
|
|
5
|
-
|
|
6
|
-
### Compiles and hot-reloads for development
|
|
7
|
-
```
|
|
8
|
-
npm run serve
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Compiles and minifies for production
|
|
12
|
-
```
|
|
13
|
-
npm run build
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### Lints and fixes files
|
|
17
|
-
```
|
|
18
|
-
npm run lint
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Customize configuration
|
|
22
|
-
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
1
|
+
## Project setup
|
|
2
|
+
```
|
|
3
|
+
npm install
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
### Compiles and hot-reloads for development
|
|
7
|
+
```
|
|
8
|
+
npm run serve
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Compiles and minifies for production
|
|
12
|
+
```
|
|
13
|
+
npm run build
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Lints and fixes files
|
|
17
|
+
```
|
|
18
|
+
npm run lint
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Customize configuration
|
|
22
|
+
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2.1
|
|
1
|
+
{
|
|
2
|
+
"version": 2.1
|
|
3
3
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
node_modules
|
|
3
|
-
/dist
|
|
4
|
-
|
|
5
|
-
# local env files
|
|
6
|
-
.env.local
|
|
7
|
-
.env.*.local
|
|
8
|
-
|
|
9
|
-
# Log files
|
|
10
|
-
npm-debug.log*
|
|
11
|
-
yarn-debug.log*
|
|
12
|
-
yarn-error.log*
|
|
13
|
-
|
|
14
|
-
# Editor directories and files
|
|
15
|
-
.idea
|
|
16
|
-
.vscode
|
|
17
|
-
*.suo
|
|
18
|
-
*.ntvs*
|
|
19
|
-
*.njsproj
|
|
20
|
-
*.sln
|
|
21
|
-
*.sw?
|
|
1
|
+
.DS_Store
|
|
2
|
+
node_modules
|
|
3
|
+
/dist
|
|
4
|
+
|
|
5
|
+
# local env files
|
|
6
|
+
.env.local
|
|
7
|
+
.env.*.local
|
|
8
|
+
|
|
9
|
+
# Log files
|
|
10
|
+
npm-debug.log*
|
|
11
|
+
yarn-debug.log*
|
|
12
|
+
yarn-error.log*
|
|
13
|
+
|
|
14
|
+
# Editor directories and files
|
|
15
|
+
.idea
|
|
16
|
+
.vscode
|
|
17
|
+
*.suo
|
|
18
|
+
*.ntvs*
|
|
19
|
+
*.njsproj
|
|
20
|
+
*.sln
|
|
21
|
+
*.sw?
|