Skip to content

Commit 9a20c42

Browse files
author
Fawad Mirzad
committed
Update dependencies and improve build system
1 parent 04431e1 commit 9a20c42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+8391
-1060
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset=utf-8
5+
end_of_line=lf
6+
insert_final_newline=true
7+
indent_style=space
8+
indent_size=2
9+
trim_trailing_whitespace = true

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VUE_APP_TITLE=Vue3 Mobile

.env.development

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VUE_APP_API_BASE_URL=https://development.example.com

.env.production

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VUE_APP_API_BASE_URL=https://production.example.com

.eslintrc.js

+42-30
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
1-
module.exports = {
2-
root: true,
3-
env: {
4-
node: true
5-
},
6-
extends: [
7-
"plugin:vue/vue3-essential",
8-
"eslint:recommended",
9-
"@vue/prettier",
10-
"plugin:cypress/recommended"
11-
],
12-
parserOptions: {
13-
parser: "babel-eslint"
14-
},
15-
rules: {
16-
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
17-
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
18-
},
19-
overrides: [
20-
{
21-
files: [
22-
"**/__tests__/*.{j,t}s?(x)",
23-
"**/tests/unit/**/*.spec.{j,t}s?(x)"
24-
],
25-
env: {
26-
jest: true
27-
}
28-
}
29-
]
30-
};
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
node: true,
6+
},
7+
"globals": {
8+
"google": true
9+
},
10+
// the ts-eslint recommended ruleset sets the parser so we need to set it back
11+
parser: 'vue-eslint-parser',
12+
13+
parserOptions: {
14+
ecmaVersion: 2020,
15+
extraFileExtensions: ['.vue'],
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
sourceType: 'module',
20+
},
21+
22+
extends: [
23+
'plugin:vue/vue3-essential',
24+
'eslint:recommended',
25+
'plugin:prettier/recommended',
26+
'prettier/vue',
27+
],
28+
29+
rules: {
30+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
31+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
32+
},
33+
34+
overrides: [
35+
{
36+
files: ['*.js'],
37+
rules: {
38+
'@typescript-eslint/no-var-requires': 'off',
39+
},
40+
},
41+
],
42+
}

.gitignore

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1-
.idea
1+
.DS_Store
22
node_modules
3-
dist
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?
22+
23+
# Git
24+
*.diff
25+
*.patch
26+
*.bak

.prettierrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
printWidth: 100,
3+
semi: false,
4+
singleQuote: true,
5+
}

.stylelintrc.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
extends: 'stylelint-config-standard',
3+
plugins: ['stylelint-scss', 'stylelint-order'],
4+
ignoreFiles: ['node_modules/**', 'src/assets/font/**', 'src/assets/style/reset.css'],
5+
rules: {
6+
'at-rule-no-unknown': [
7+
true,
8+
{
9+
ignoreAtRules: ['extends', 'ignores', 'include', 'mixin', 'if', 'else', 'media', 'for'],
10+
},
11+
],
12+
'order/order': ['custom-properties', 'declarations'],
13+
'order/properties-order': ['width', 'height'],
14+
},
15+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Jamie Yang
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

babel.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
useBuiltIns: 'usage', // adds specific imports for polyfills when they are used in each file.
7+
modules: false, // preserve ES modules.
8+
corejs: { version: 3, proposals: true }, // enable polyfilling of every proposal supported by core-js.
9+
},
10+
],
11+
],
12+
plugins: [
13+
'@babel/plugin-transform-runtime', // enables the re-use of Babel's injected helper code to save on codesize.
14+
],
15+
exclude: [/core-js/],
16+
}

jsconfig.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"baseUrl": ".",
5+
"paths": {
6+
"@/*": ["src/*"]
7+
}
8+
},
9+
"exclude": ["node_modules", "dist"],
10+
"include": ["src/**/*"]
11+
}

0 commit comments

Comments
 (0)