解决冲突

This commit is contained in:
waliang.wang 2017-07-27 20:35:56 +08:00
commit 51b83b0224
10 changed files with 27 additions and 8 deletions

View File

@ -23,6 +23,7 @@
} }
} }
.footerMask{ .footerMask{
@include wrap-width-limit;
position: absolute; position: absolute;
top: 0px; top: 0px;
height: 100%; height: 100%;

View File

@ -8,10 +8,10 @@ $color-grey-deep : #929aac;
$color-black-light : #404040; $color-black-light : #404040;
/* .header-box.css */ /* .header-box.css */
.header-box { .header-box {
@include wrap-width-limit;
display: block; display: block;
font-size: 0.14rem; font-size: 0.14rem;
z-index: 99; z-index: 99;
@include wrap-width-limit;
.content { .content {
@include row-width-limit; @include row-width-limit;
margin: 0 auto; margin: 0 auto;

View File

@ -239,6 +239,7 @@ export default class InterfaceTest extends Component {
style={{marginLeft: 10}} style={{marginLeft: 10}}
loading={this.state.loading} loading={this.state.loading}
>发送</Button> >发送</Button>
<span style={{fontSize: 12}}>请求测试真实接口</span>
</div> </div>
<Card title="HEADERS" noHovering style={{marginTop: 10}} className={Object.keys(headers).length ? '' : 'hidden'}> <Card title="HEADERS" noHovering style={{marginTop: 10}} className={Object.keys(headers).length ? '' : 'hidden'}>
<div className="req-row headers"> <div className="req-row headers">

View File

@ -52,7 +52,6 @@ $color-black-lighter: #404040;
@include row-width-limit; @include row-width-limit;
margin: 1rem auto 0; margin: 1rem auto 0;
.user-des{ .user-des{
@include row-width-limit;
margin: 0 auto .5rem; margin: 0 auto .5rem;
text-align: center; text-align: center;
.title{ .title{
@ -74,9 +73,9 @@ $color-black-lighter: #404040;
} }
} }
.main-part{ .main-part{
padding: .9rem .5rem;
height: 5.8rem;
@include wrap-width-limit; @include wrap-width-limit;
padding: .9rem 0;
height: 5.8rem;
&:nth-child(odd){ &:nth-child(odd){
background-color: $color-blue-lighter; background-color: $color-blue-lighter;
} }
@ -86,7 +85,7 @@ $color-black-lighter: #404040;
} }
.feat-part{ .feat-part{
@include wrap-width-limit; @include wrap-width-limit;
padding: .9rem .5rem; padding: .9rem 0;
background-color: $color-white; background-color: $color-white;
p{ p{
display: flex; display: flex;

View File

@ -99,6 +99,7 @@
// background-color: #f1f3f6; // background-color: #f1f3f6;
border-left: 4px solid #f1f3f6; border-left: 4px solid #f1f3f6;
margin-right: 30px; margin-right: 30px;
white-space: nowrap;
} }
.text{ .text{
padding-right: 15px; padding-right: 15px;

View File

@ -4,5 +4,5 @@
} }
@mixin wrap-width-limit { @mixin wrap-width-limit {
min-width: 10.7rem; min-width: 9.7rem;
} }

View File

@ -1,6 +1,7 @@
{ {
"port": "3000", "port": "3000",
"webhost": "yapi.local.qunar.com", "webhost": "yapi.local.qunar.com",
"server_ip": "192.168.1.1",
"adminAccount": "admin@admin.com", "adminAccount": "admin@admin.com",
"db": { "db": {
"servername": "127.0.0.1", "servername": "127.0.0.1",

View File

@ -11,6 +11,8 @@ const DIST = 'server_dist/';
const SRC = 'server/**/*.js'; const SRC = 'server/**/*.js';
function generateBabel(status) { function generateBabel(status) {
// 返回一个新的 babel 插件
const babelProcess = babel({ const babelProcess = babel({
presets: ['es2015', 'stage-3'], presets: ['es2015', 'stage-3'],
plugins: ['transform-runtime'] plugins: ['transform-runtime']
@ -43,6 +45,9 @@ function excuteCmd(cmd, args, opts) {
output('log', `${NAME} ${message}`, true); output('log', `${NAME} ${message}`, true);
// ykit 成功编译时会输出带有 build complete 字样的 log
// 此时停止正在编译的提示
// 换为等待文件变更的提示
if (~message.indexOf('building complete')) { if (~message.indexOf('building complete')) {
waitingSpinner(); waitingSpinner();
} }
@ -102,14 +107,22 @@ gulp.task('initialBuild', ['removeDist'], () => {
}); });
gulp.task('default', ['initialBuild'], () => { gulp.task('default', ['initialBuild'], () => {
// 若 client/ 下的文件发生变动则显示正在编译的提示
// 并在编译完成之后停止
gulp.watch('client/**/*', event => { gulp.watch('client/**/*', event => {
spinner.stop(); spinner.stop();
spinner = ora(`正在编译 ${event.path}`).start(); spinner = ora(`正在编译 ${event.path}`).start();
}); });
gulp.watch(SRC, event => { gulp.watch(SRC, event => {
// 获取变更文件相对于 server/ 的路径
// 此路径用于 gulp.dest() 写入新文件
let originFilePath = path.relative(path.join(__dirname, 'server'), event.path); let originFilePath = path.relative(path.join(__dirname, 'server'), event.path);
let distPath = path.resolve(DIST, path.join(originFilePath)); let distPath = path.resolve(DIST, path.join(originFilePath));
// 编译提示
spinner.text = `正在编译 ${event.path}...`; spinner.text = `正在编译 ${event.path}...`;
gulp.src(event.path).pipe(generateBabel()) gulp.src(event.path).pipe(generateBabel())
@ -121,12 +134,14 @@ gulp.task('default', ['initialBuild'], () => {
}); });
}); });
// 全量编译后端代码
gulp.task('buildNode', () => { gulp.task('buildNode', () => {
return gulp.src(SRC) return gulp.src(SRC)
.pipe(generateBabel()) .pipe(generateBabel())
.pipe(gulp.dest(DIST)); .pipe(gulp.dest(DIST));
}); });
// 仅监测后端代码并实时编译
gulp.task('watchNode', ['buildNode'], () => { gulp.task('watchNode', ['buildNode'], () => {
return watch(SRC, { return watch(SRC, {
verbose: true, verbose: true,
@ -136,6 +151,7 @@ gulp.task('watchNode', ['buildNode'], () => {
.pipe(gulp.dest(DIST)); .pipe(gulp.dest(DIST));
}); });
// 编译前后端
gulp.task('build', () => { gulp.task('build', () => {
let status = { let status = {
count: 0 count: 0

View File

@ -1,7 +1,7 @@
import path from 'path'; import path from 'path';
import fs from 'fs-extra'; import fs from 'fs-extra';
import nodemailer from 'nodemailer'; import nodemailer from 'nodemailer';
import config from '../config.json'; import config from '../../config.json';
let insts = new Map(); let insts = new Map();
let mail; let mail;

View File

@ -16,7 +16,7 @@ var _nodemailer = require('nodemailer');
var _nodemailer2 = _interopRequireDefault(_nodemailer); var _nodemailer2 = _interopRequireDefault(_nodemailer);
var _config = require('../config.json'); var _config = require('../../config.json');
var _config2 = _interopRequireDefault(_config); var _config2 = _interopRequireDefault(_config);