diff --git a/backend/pom.xml b/backend/pom.xml index 4e85ebe345..a991476c7f 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -410,13 +410,13 @@ - + - + diff --git a/mobile/.env.development b/mobile/.env.development new file mode 100644 index 0000000000..d71a650d36 --- /dev/null +++ b/mobile/.env.development @@ -0,0 +1,13 @@ +# just a flag +ENV = 'development' + +# base api +VUE_APP_BASE_API = 'http://localhost:8081/' +# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, +# to control whether the babel-plugin-dynamic-import-node plugin is enabled. +# It only does one thing by converting all import() to require(). +# This configuration can significantly increase the speed of hot updates, +# when you have a large number of pages. +# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js + +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/mobile/.env.production b/mobile/.env.production new file mode 100644 index 0000000000..d24a4671c1 --- /dev/null +++ b/mobile/.env.production @@ -0,0 +1,7 @@ +# just a flag +ENV = 'production' + +# base api +# VUE_APP_BASE_API = 'http://localhost:8081/' +VUE_APP_BASE_API = '/' + diff --git a/mobile/README.md b/mobile/README.md new file mode 100644 index 0000000000..43f29b28fe --- /dev/null +++ b/mobile/README.md @@ -0,0 +1,19 @@ +# dataease-mobile + +## Project setup +``` +npm install +``` + +### Compiles and hot-reloads for development +``` +npm run serve +``` + +### Compiles and minifies for production +``` +npm run build +``` + +### Customize configuration +See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/mobile/babel.config.js b/mobile/babel.config.js new file mode 100644 index 0000000000..dc4690aba5 --- /dev/null +++ b/mobile/babel.config.js @@ -0,0 +1,63 @@ +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/app', + { + modules: 'commonjs', + useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry' + } + ] + ], + plugins +} diff --git a/mobile/dist/build/.automator/h5/.automator.json b/mobile/dist/build/.automator/h5/.automator.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mobile/dist/build/h5/index.html b/mobile/dist/build/h5/index.html new file mode 100644 index 0000000000..0cdbd37709 --- /dev/null +++ b/mobile/dist/build/h5/index.html @@ -0,0 +1,5 @@ +