This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

更新打包配置;优化meditor样式

old
宇天 2018-08-05 19:23:14 +08:00
parent f1bcf9fad8
commit ce92b7ca4c
5 changed files with 28 additions and 20 deletions

View File

@ -4,12 +4,18 @@ const log = console.log
const fs = require('iofs')
const path = require('path')
const scss = require('node-sass')
const postcss = require('postcss')
const autoprefixer = require('autoprefixer')
const chalk = require('chalk')
const uglify = require('uglify-es')
const sourceDir = path.resolve(__dirname, 'src')
const buildDir = path.resolve(__dirname, 'dist')
const prefixer = postcss().use(
autoprefixer({
browsers: ['ff > 58', 'Chrome > 61']
})
)
const cssOpt = {
outputStyle: 'compressed'
@ -39,12 +45,14 @@ const compileCss = (entry, output) => {
let t1 = Date.now()
const { css } = scss.renderSync({ ...cssOpt, file: entry })
prefixer.process(css, { from: '', to: '' }).then(result => {
log(
'编译scss: %s, 耗时 %s ms',
chalk.green(entry),
chalk.yellow(Date.now() - t1)
)
fs.echo(css, output)
fs.echo(result.css, output)
})
}
/*=======================================================*/

View File

@ -27,7 +27,7 @@
h5:before,
h6:before {display:block;position:absolute;left:0;top:50%;width:100%;content:" ";border-bottom:1px solid #ddd;}
a {text-decoration:underline;}
a {text-decoration:underline;color:nth($cgr, 1)}
a:hover {color:nth($co, 2)}
p {margin:15px 0;}
img {max-width:100%;}

File diff suppressed because one or more lines are too long

View File

@ -278,7 +278,7 @@ function showDialog(elem, vm, tool) {
menubar: false,
fixed: true,
maskClose: true,
offset: [offset.top + 40 - $doc.scrollTop()],
offset: [offset.top + 35 - $doc.scrollTop()],
shift: {
top: offset.top - $doc.scrollTop()
},

View File

@ -39,7 +39,7 @@ const addon = {
this.close()
},
offset: [
offset.top + 40 - $doc.scrollTop(),
offset.top + 35 - $doc.scrollTop(),
'auto',
'auto',
offset.left - $doc.scrollLeft()
@ -130,7 +130,7 @@ const addon = {
this.close()
},
offset: [
offset.top + 40 - $doc.scrollTop(),
offset.top + 35 - $doc.scrollTop(),
'auto',
'auto',
offset.left - $doc.scrollLeft()
@ -228,7 +228,7 @@ const addon = {
'🙏'
],
offset: [
offset.top + 40 - $doc.scrollTop(),
offset.top + 35 - $doc.scrollTop(),
'auto',
'auto',
offset.left - $doc.scrollLeft()
@ -259,7 +259,7 @@ const addon = {
maskClose: true,
maskColor: 'rgba(255,255,255,0)',
offset: [
offset.top + 40 - $doc.scrollTop(),
offset.top + 35 - $doc.scrollTop(),
'auto',
'auto',
offset.left - $doc.scrollLeft()
@ -350,7 +350,7 @@ const addon = {
this.close()
},
offset: [
offset.top + 40 - $doc.scrollTop(),
offset.top + 35 - $doc.scrollTop(),
'auto',
'auto',
offset.left - $doc.scrollLeft()
@ -482,7 +482,7 @@ const addon = {
title: '关于编辑器',
maskClose: true,
maskColor: 'rgba(255,255,255,0)',
offset: [offset.top + 37 - $doc.scrollTop()],
offset: [offset.top + 35 - $doc.scrollTop()],
shift: { top: offset.top - $doc.scrollTop() },
content:
'<div class="do-meditor-about">' +