-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use uni-app framework (doocs#55)
* update framework to uni-app * fix: bug fix * fix: bug fix * 修改输出路径 * feat: publicPath * feat: manifest update * fix: cssEditor theme * fix: style * style: format code with prettier * fix: table style & copy style on the night mode * fix: upload image * fix: style Co-authored-by: yanglbme <[email protected]>
- Loading branch information
Showing
41 changed files
with
23,518 additions
and
12,188 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 80 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: ["plugin:vue/essential", "@vue/standard"], | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "error" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", | ||
camelcase: "off", | ||
eqeqeq: "off", | ||
}, | ||
parserOptions: { | ||
parser: "babel-eslint", | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
"**/__tests__/*.{j,t}s?(x)", | ||
"**/tests/unit/**/*.spec.{j,t}s?(x)", | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
extends: ["plugin:vue/essential", "@vue/standard"], | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "error" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", | ||
camelcase: "off", | ||
eqeqeq: "off", | ||
}, | ||
parserOptions: { | ||
parser: "babel-eslint", | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
"**/__tests__/*.{j,t}s?(x)", | ||
"**/tests/unit/**/*.spec.{j,t}s?(x)", | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,60 @@ | ||
const plugins = []; | ||
|
||
if (process.env.UNI_OPT_TREESHAKINGNG) { | ||
plugins.push( | ||
require("@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js") | ||
); | ||
} | ||
|
||
if ( | ||
(process.env.UNI_PLATFORM === "app-plus" && process.env.UNI_USING_V8) || | ||
(process.env.UNI_PLATFORM === "h5" && | ||
process.env.UNI_H5_BROWSER === "builtin") | ||
) { | ||
const path = require("path"); | ||
|
||
const isWin = /^win/.test(process.platform); | ||
|
||
const normalizePath = (path) => (isWin ? path.replace(/\\/g, "/") : path); | ||
|
||
const input = normalizePath(process.env.UNI_INPUT_DIR); | ||
try { | ||
plugins.push([ | ||
require("@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console"), | ||
{ | ||
file(file) { | ||
file = normalizePath(file); | ||
if (file.indexOf(input) === 0) { | ||
return path.relative(input, file); | ||
} | ||
return false; | ||
}, | ||
}, | ||
]); | ||
} catch (e) {} | ||
} | ||
|
||
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ["@dcloudio/uni-ui"]; | ||
process.UNI_LIBRARIES.forEach((libraryName) => { | ||
plugins.push([ | ||
"import", | ||
{ | ||
libraryName: libraryName, | ||
customName: (name) => { | ||
return `${libraryName}/lib/${name}/${name}`; | ||
}, | ||
}, | ||
]); | ||
}); | ||
module.exports = { | ||
presets: ["@vue/cli-plugin-babel/preset"], | ||
presets: [ | ||
[ | ||
"@vue/app", | ||
{ | ||
modules: "commonjs", | ||
useBuiltIns: process.env.UNI_PLATFORM === "h5" ? "usage" : "entry", | ||
}, | ||
], | ||
], | ||
plugins, | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.