Commit c73c5c89 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/test' into 'master'

Feature/test

See merge request !2
parents da15d790 6a333c9b
import { Vue, Component, Prop } from 'vue-property-decorator';
import cherryUi from '@qg/cherry-ui';
import Raven from 'raven-js';
import RavenVue from 'raven-js/plugins/vue';
import { release } from '@/.sentryclirc';
import '@qg/cherry-ui/dist/cherry.css';
Vue.use(cherryUi);
import '@/service/qg.service';
// 初始化sentry
if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production') {
......
......@@ -8,7 +8,6 @@
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/public/asset/css/reset.css">
<link rel="stylesheet" href="">
</head>
<body>
<div id="app"><slot></slot></div>
......
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import iView from 'iview';
import cherryUi from '@qg/cherry-ui';
import Raven from 'raven-js';
import RavenVue from 'raven-js/plugins/vue';
import { release } from '@/.sentryclirc';
import VueContextMenu from '@editor/component/Contextmenu/index';
import localStorage from '@/service/localStorage.service';
import '@/service/qg.service';
import 'iview/dist/styles/iview.css';
import '@qg/cherry-ui/dist/cherry.css';
Vue.use(iView);
Vue.use(cherryUi);
Vue.use(VueContextMenu);
// 初始化sentry
......
import { Vue, Component, Prop } from 'vue-property-decorator';
// import cherryUi from '../../../../../node_modules/@qg/cherry-ui/src/index';
import cherryUi from '@qg/cherry-ui';
import iView from 'iview';
import '@qg/cherry-ui/dist/cherry.css';
import 'iview/dist/styles/iview.css';
Vue.use(iView);
Vue.use(cherryUi);
@Component({
name: 'Layout'
......
......@@ -2,4 +2,5 @@ import prod from './prod.config';
import dev from './dev.config';
import test from './test.config';
export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
// export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
export default process.env.SENTRY_ENV ? test : process.env.NODE_ENV === 'production' ? prod : dev;
// export const basicComponents = require('@qg/cherry-ui/md/index.json');
// export const kaLoginForm = require('@qg/citrus-ui/md/index.json');
export const basicComponents = [
{
eleName: 'freedom-container',
......
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import components from '@qg/cherry-ui/src/index.js';
import FreedomContainer from '../../component/FreedomContainer/index.vue';
import { kebabCase, chunk, flatten } from 'lodash';
import { State } from 'vuex-class';
......@@ -52,17 +51,17 @@ export default class DynamicComponent extends Vue {
console.log('dragend');
}
getProps(eleName) {
const props = {};
for (const key of Object.keys(components)) {
const component = components[key];
if (kebabCase(component.name) === eleName && component.props) {
for (const prop of Object.keys(component.props)) {
props[prop] = ['Object', 'Array'].includes(component.props[prop].type.name) ? component.props[prop].default && component.props[prop].default() : component.props[prop].default;
}
}
}
// getProps(eleName) {
// const props = {};
// for (const key of Object.keys(components)) {
// const component = components[key];
// if (kebabCase(component.name) === eleName && component.props) {
// for (const prop of Object.keys(component.props)) {
// props[prop] = ['Object', 'Array'].includes(component.props[prop].type.name) ? component.props[prop].default && component.props[prop].default() : component.props[prop].default;
// }
// }
// }
return props;
}
// return props;
// }
}
\ No newline at end of file
......@@ -5,7 +5,6 @@ import DynamicComponent from '@editor/component/DynamicComponent/index.vue';
import VueGridLayout from 'vue-grid-layout';
import FreedomContainer from '../../component/FreedomContainer/index.vue';
import DynamicForm from '../../component/DynamicForm/index.vue';
import components from '@qg/cherry-ui/src/index.js';
import LoginForm from '@/lib/Form/index.vue';
import DownloadGuide from '@/lib/DownloadGuide/index.vue';
import { ContextMenu } from '@editor/mixins/contextMenu.mixin';
......
import Vue from 'vue';
import {
Button,
Image,
Icon,
Cell,
CellGroup,
Row,
Col,
Dialog,
Popup,
Overlay,
Divider,
Loading,
Picker,
NavBar,
Field,
Checkbox,
CardList,
List,
Form,
Sticky,
Tab,
Tabs
} from '@qg/cherry-ui';
// import { KaLoginForm } from '@qg/citrus-ui';
Vue.use(Button);
Vue.use(Image);
// Vue.use(Cell);
// Vue.use(CellGroup);
// Vue.use(Row);
// Vue.use(Col);
// Vue.use(Popup);
// Vue.use(Divider);
// Vue.use(Picker);
Vue.use(Field);
// Vue.use(Dialog);
// Vue.use(Checkbox);
// Vue.use(Icon);
// Vue.use(Sticky);
// Vue.use(Overlay);
Vue.use(Form);
// Vue.use(CardList);
// Vue.use(Loading);
// Vue.use(List);
// Vue.use(Tab);
// Vue.use(Tabs);
// Vue.use(KaLoginForm);
......@@ -22,12 +22,7 @@ export default (appInfo: EggAppConfig) => {
injectCss: false
};
exports.webpack = {
webpackConfigList: getWebpackConfig(),
browser: 'http://localhost:7001/editor/list'
};
exports.sequelize = {
const localMysqlConfig = {
dialect: 'mysql',
username: 'qa',
password: 'qatest',
......@@ -36,5 +31,12 @@ export default (appInfo: EggAppConfig) => {
database: 'low_code',
};
exports.sequelize = localMysqlConfig;
exports.webpack = {
webpackConfigList: getWebpackConfig(),
browser: 'http://localhost:7001/editor/list'
};
return exports;
};
......@@ -31,8 +31,9 @@ export default (appInfo: EggAppConfig) => {
database: 'low_code',
};
// exports.sequelize = process.env.NODE_ENV === 'test' ? localMysqlConfig : prodMysqlConfig;
exports.sequelize = localMysqlConfig;
console.log('process.env.NODE_ENV', process.env.NAMESPACE);
exports.sequelize = process.env.NAMESPACE ? localMysqlConfig : prodMysqlConfig;
return exports;
};
......@@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "低代码平台",
"scripts": {
"start": "egg-scripts start --port 9050 --workers 1",
"start": "egg-scripts start --port 80 --workers 1",
"stop": "egg-scripts stop",
"backend": "nohup egg-scripts start --port 7001 --workers 4",
"dev": "egg-bin dev -r egg-ts-helper/register",
......@@ -18,14 +18,25 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},
"dependencies": {
"@babel/plugin-syntax-jsx": "^7.12.1",
"@better-scroll/core": "^2.0.5",
"@easy-team/easywebpack-cli": "^4.0.0",
"@easy-team/easywebpack-vue": "^4.0.0",
"@hubcarl/json-typescript-mapper": "^2.0.0",
"@qg/cherry-ui": "^2.18.66",
"@qg/citrus-ui": "0.0.1-alpha.1",
"@types/lodash": "^4.14.117",
"@types/node": "^10.12.0",
"@types/validator": "^4.5.26",
"axios": "^0.18.1",
"babel-plugin-transform-vue-jsx": "^4.0.1",
"cz-conventional-changelog": "^2.1.0",
"egg": "^2.3.0",
"egg-bin": "^4.9.0",
"egg-cors": "^2.1.1",
"egg-scripts": "^2.10.0",
"egg-sequelize-ts": "^0.2.3-0",
"egg-ts-helper": "^1.13.0",
"egg-view-vue-ssr": "^3.0.5",
"egg-webpack": "^4.4.7",
"egg-webpack-vue": "^2.0.0",
......@@ -33,10 +44,13 @@
"html2canvas": "^1.0.0-rc.7",
"iview": "^2.9.0",
"js-cookie": "^2.2.1",
"less": "^3.12.2",
"less-loader": "^7.1.0",
"lodash": "^4.17.4",
"mockjs": "^1.0.1-beta3",
"moment": "^2.17.1",
"mysql2": "^2.2.5",
"node-tool-utils": "^1.1.1",
"npm": "^6.14.10",
"postcss-px2rem": "^0.3.0",
"qs": "^6.9.4",
......@@ -44,6 +58,12 @@
"sa-sdk-javascript": "^1.15.27",
"sequelize": "^4.38.0",
"sequelize-typescript": "^0.6.6",
"ts-loader": "^5.3.0",
"ts-node": "^7.0.1",
"tslint": "^5.9.1",
"tslint-eslint-rules": "^5.4.0",
"tslint-loader": "^3.5.3",
"typescript": "^3.9.2",
"vue": "^2.6.12",
"vue-grid-layout": "^2.3.11",
"vue-property-decorator": "^7.2.0",
......@@ -51,25 +71,6 @@
"vuex": "^3.0.1",
"vuex-class": "^0.3.1",
"vuex-router-sync": "^5.0.0",
"@babel/plugin-syntax-jsx": "^7.12.1",
"@easy-team/easywebpack-cli": "^4.0.0",
"@easy-team/easywebpack-vue": "^4.0.0",
"@types/lodash": "^4.14.117",
"@types/node": "^10.12.0",
"@types/validator": "^4.5.26",
"babel-plugin-transform-vue-jsx": "^4.0.1",
"cz-conventional-changelog": "^2.1.0",
"egg-bin": "^4.9.0",
"egg-ts-helper": "^1.13.0",
"less": "^3.12.2",
"less-loader": "^7.1.0",
"node-tool-utils": "^1.1.1",
"ts-loader": "^5.3.0",
"ts-node": "^7.0.1",
"tslint": "^5.9.1",
"tslint-eslint-rules": "^5.4.0",
"tslint-loader": "^3.5.3",
"typescript": "^3.9.2",
"webpack-sentry-plugin": "^1.16.0"
},
"devDependencies": {},
......
......@@ -67,8 +67,15 @@ module.exports = {
args: SentryConfig
}
},
{
define:{
'process.env': {
SENTRY_ENV: JSON.stringify(process.env.SENTRY_ENV)
}
}
}
],
optimization: {
optimization: {
namedModules: true,
namedChunks: true,
runtimeChunk: {
......@@ -83,13 +90,13 @@ module.exports = {
default: false,
saSdk: {
name: "chunk-sa-sdk", // split cherryUI into a single package
priority: 22, // the weight needs to be larger than libs and app or it will be packaged into libs or app
priority: 21, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]sa-sdk-javascript[\\/]/, // in order to adapt to cnpm
enforce: true
},
cherryUI: {
name: 'chunk-cherryUI', // 分离组件库
priority: 21,
priority: 22,
chunks: 'all',
test: /[\\/]node_modules[\\/]@qg[\\/]cherry-ui[\\/]/,
enforce: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment