mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-15 05:10:47 +08:00
解决冲突
This commit is contained in:
commit
51b83b0224
@ -23,6 +23,7 @@
|
||||
}
|
||||
}
|
||||
.footerMask{
|
||||
@include wrap-width-limit;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
height: 100%;
|
||||
|
@ -8,10 +8,10 @@ $color-grey-deep : #929aac;
|
||||
$color-black-light : #404040;
|
||||
/* .header-box.css */
|
||||
.header-box {
|
||||
@include wrap-width-limit;
|
||||
display: block;
|
||||
font-size: 0.14rem;
|
||||
z-index: 99;
|
||||
@include wrap-width-limit;
|
||||
.content {
|
||||
@include row-width-limit;
|
||||
margin: 0 auto;
|
||||
|
@ -239,6 +239,7 @@ export default class InterfaceTest extends Component {
|
||||
style={{marginLeft: 10}}
|
||||
loading={this.state.loading}
|
||||
>发送</Button>
|
||||
<span style={{fontSize: 12}}>(请求测试真实接口)</span>
|
||||
</div>
|
||||
<Card title="HEADERS" noHovering style={{marginTop: 10}} className={Object.keys(headers).length ? '' : 'hidden'}>
|
||||
<div className="req-row headers">
|
||||
|
@ -52,7 +52,6 @@ $color-black-lighter: #404040;
|
||||
@include row-width-limit;
|
||||
margin: 1rem auto 0;
|
||||
.user-des{
|
||||
@include row-width-limit;
|
||||
margin: 0 auto .5rem;
|
||||
text-align: center;
|
||||
.title{
|
||||
@ -74,9 +73,9 @@ $color-black-lighter: #404040;
|
||||
}
|
||||
}
|
||||
.main-part{
|
||||
padding: .9rem .5rem;
|
||||
height: 5.8rem;
|
||||
@include wrap-width-limit;
|
||||
padding: .9rem 0;
|
||||
height: 5.8rem;
|
||||
&:nth-child(odd){
|
||||
background-color: $color-blue-lighter;
|
||||
}
|
||||
@ -86,7 +85,7 @@ $color-black-lighter: #404040;
|
||||
}
|
||||
.feat-part{
|
||||
@include wrap-width-limit;
|
||||
padding: .9rem .5rem;
|
||||
padding: .9rem 0;
|
||||
background-color: $color-white;
|
||||
p{
|
||||
display: flex;
|
||||
|
@ -99,6 +99,7 @@
|
||||
// background-color: #f1f3f6;
|
||||
border-left: 4px solid #f1f3f6;
|
||||
margin-right: 30px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.text{
|
||||
padding-right: 15px;
|
||||
|
@ -4,5 +4,5 @@
|
||||
}
|
||||
|
||||
@mixin wrap-width-limit {
|
||||
min-width: 10.7rem;
|
||||
min-width: 9.7rem;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"port": "3000",
|
||||
"webhost": "yapi.local.qunar.com",
|
||||
"server_ip": "192.168.1.1",
|
||||
"adminAccount": "admin@admin.com",
|
||||
"db": {
|
||||
"servername": "127.0.0.1",
|
||||
|
16
gulpfile.js
16
gulpfile.js
@ -11,6 +11,8 @@ const DIST = 'server_dist/';
|
||||
const SRC = 'server/**/*.js';
|
||||
|
||||
function generateBabel(status) {
|
||||
|
||||
// 返回一个新的 babel 插件
|
||||
const babelProcess = babel({
|
||||
presets: ['es2015', 'stage-3'],
|
||||
plugins: ['transform-runtime']
|
||||
@ -43,6 +45,9 @@ function excuteCmd(cmd, args, opts) {
|
||||
|
||||
output('log', `${NAME} ${message}`, true);
|
||||
|
||||
// ykit 成功编译时会输出带有 build complete 字样的 log
|
||||
// 此时停止正在编译的提示
|
||||
// 换为等待文件变更的提示
|
||||
if (~message.indexOf('building complete')) {
|
||||
waitingSpinner();
|
||||
}
|
||||
@ -102,14 +107,22 @@ gulp.task('initialBuild', ['removeDist'], () => {
|
||||
});
|
||||
|
||||
gulp.task('default', ['initialBuild'], () => {
|
||||
|
||||
// 若 client/ 下的文件发生变动则显示正在编译的提示
|
||||
// 并在编译完成之后停止
|
||||
gulp.watch('client/**/*', event => {
|
||||
spinner.stop();
|
||||
spinner = ora(`正在编译 ${event.path}`).start();
|
||||
});
|
||||
|
||||
gulp.watch(SRC, event => {
|
||||
|
||||
// 获取变更文件相对于 server/ 的路径
|
||||
// 此路径用于 gulp.dest() 写入新文件
|
||||
let originFilePath = path.relative(path.join(__dirname, 'server'), event.path);
|
||||
let distPath = path.resolve(DIST, path.join(originFilePath));
|
||||
|
||||
// 编译提示
|
||||
spinner.text = `正在编译 ${event.path}...`;
|
||||
|
||||
gulp.src(event.path).pipe(generateBabel())
|
||||
@ -121,12 +134,14 @@ gulp.task('default', ['initialBuild'], () => {
|
||||
});
|
||||
});
|
||||
|
||||
// 全量编译后端代码
|
||||
gulp.task('buildNode', () => {
|
||||
return gulp.src(SRC)
|
||||
.pipe(generateBabel())
|
||||
.pipe(gulp.dest(DIST));
|
||||
});
|
||||
|
||||
// 仅监测后端代码并实时编译
|
||||
gulp.task('watchNode', ['buildNode'], () => {
|
||||
return watch(SRC, {
|
||||
verbose: true,
|
||||
@ -136,6 +151,7 @@ gulp.task('watchNode', ['buildNode'], () => {
|
||||
.pipe(gulp.dest(DIST));
|
||||
});
|
||||
|
||||
// 编译前后端
|
||||
gulp.task('build', () => {
|
||||
let status = {
|
||||
count: 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import nodemailer from 'nodemailer';
|
||||
import config from '../config.json';
|
||||
import config from '../../config.json';
|
||||
|
||||
let insts = new Map();
|
||||
let mail;
|
||||
|
@ -16,7 +16,7 @@ var _nodemailer = require('nodemailer');
|
||||
|
||||
var _nodemailer2 = _interopRequireDefault(_nodemailer);
|
||||
|
||||
var _config = require('../config.json');
|
||||
var _config = require('../../config.json');
|
||||
|
||||
var _config2 = _interopRequireDefault(_config);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user