fail to run bug fix (#62)

This commit is contained in:
yrong1997 2019-05-26 18:01:16 +08:00 committed by imfunny
parent af801b40f9
commit cb5bba6ba0
3 changed files with 10 additions and 7 deletions

1
.gitignore vendored
View File

@ -65,3 +65,4 @@ dist/
# Editor files and folders
.vscode/
.idea/

View File

@ -10,8 +10,9 @@ const { getConfig, outDir } = require('./utils');
function convertToEmoji(text) {
if (text == null) return;
text = text.toString();
if (text.match(/(?<=:\s*).*?(?=\s*:)/gs) != null) {
var str = text.match(/(?<=:\s*).*?(?=\s*:)/gs);
var pattern = /(?<=:\s*).*?(?=\s*:)/gs
if (text.match(pattern) != null) {
var str = text.match(pattern);
str = str.filter(function (arr) {
return /\S/.test(arr);
});

3
run.js
View File

@ -1,9 +1,10 @@
const express = require('express');
const open = require('open');
const defaultBrowser = require('x-default-browser');
const path = require('path');
const outDir = path.resolve('./dist/' || process.env.OUT_DIR);
const app = express();
app.use(express.static(`${outDir}/dist`));
app.use(express.static(`${outDir}`));
function runCommand(){
app.get('/',function(req,res){