代码拉取完成,页面将自动刷新
const tools = require('@wmeimob/node-tools');
const rimraf = require('rimraf');
const GulpClient = require('gulp');
function express() {
const app = tools.express.run();
app.get('/user/wxauth', (req, res) => {
return res.send(JSON.stringify({
token: '1234567890',
openid: 'openid'
}));
});
app.get('/login', (req, res) => {
if (req.get('Authorization') === '1234567890') {
return res.send(JSON.stringify({
code: 200,
msg: '登录成功'
}));
}
return res.send(JSON.stringify({
code: 401
}));
});
return app;
}
exports.express = express;
function cover() {
return tools.nodeModulesCover.run();
}
exports.cover = cover;
async function iconfont() {
return tools.iconfont.run({
path: 'src/modules/@wmeimob/taro-design/src/components/icon-font',
ctoken: '5U-_r7qXi-8qdCJX6-JGY9LX',
pid: '1481689',
cookie: 'isg=BDU14ODThD6vKOA5n0slUjE6RrfvsunEgASiW7dZ2KyvjlaAegWslcUc3tK41QF8; u=4160790; u.sig=QkhXg0vX7C6fcWiz8VcHs2RYlGTtgfJxw9r0Jwh1ot0; ctoken=5U-_r7qXi-8qdCJX6-JGY9LX; trace=AQAAAMZNihC0FwcA6pngZdj9R3qPfT4W; cna=tItGFlygzBYCAWVXb+AAjXFr; EGG_SESS_ICONFONT=U8AXvqwdm-42-umGXGwgKq_Emj2wuVCkA87TjZ3dn6xm2T4whio3sIKoy4kjkuBSusLMQ-0MhcjWBE1FwhfGmDRN3OrPfvQuMkinXa81udhDMZTMCYwUCcAvdLDKgxnAhGNjf395_yrlFH0eivkWKVo_B00cfEfnw36SOT79ayGnA3ziI4moGzePcZYvOin26SMI80f6j04GoXb43BhUq31IJDgDNlAEWET0FIySSlWk86ILdrl22M5ii3aL_QtB6N2E-nI-z9NwYudwJFuS00s0E08S9P8AXAjEh4-FzbZMwUpqc-ekLVpv8VLHKn1UJYBIdmgBH3qz7htJ3vh4ajSpObPQjrRHFTTpyhu6ht8BpoHPClW_loidowZXU1mAP1RMK_dpMvxCqHQ-4GohYrxCD_MWbimRLakBX_VOsHvKKdpoZ1uyIhMzKQwcZ78VUIv3Ie9J7ytgvraEqFketIUGzscDD0O7GViwn9xiSMf1pcVgGIhRXLGo4wRtYAuTljh0x1yq4937pffhb1EDkNzI8eYh9Ch2uHiom4w6lGmXOWiQYMBkA_5dBwokrEYHySP9jqyZkxhyvEy0EBvbOqumedy2HBjcuJFVKbECTOukdIjzLfK1-hry39Jd1N3VtMhY_U9raAPpXCK-iyl6qBDtSe8wtxflRix7xYpW0tAQCBzG8JsTwpR82RfpzRwoL6E5_Elj5aE5g-PIJXY3AUF9-kxJOHLIBOOJZEmgRqSAMW1kGlnh33obW_zO_smXgrRJtey3_O7UKgLprt48YJgioznmtaWW_7pGta2MG4dUcft4oEm0zHgjaaMmNOYr4rT6rD1zW7NIbpW9nfr3sk8seIiG2Y1Gef7YALL2nAKOISYC59jJrLXCWMJzoaQahC8jU7N0yaNqrVLpWmhykucxT-yOCn7O4YgZ40oYxRcBhwCIbAvnYnUL2NbYIgJ3Dnij6l3d92ORns8JwlKSFtQI1mbQF2kcsi3UO4ApwxqVkBHM5a-xrw-A2zjjFndPxJFQauuP-wW5Xcx9914hnKpfUyHZAt0SS7WgVq5z38iajMr3jNKbyUudpQqigH399arAROUyJQ_sN23uZCtzb24t1KKvh9-W-XfjClllp2QCLdsE68Xod4_N3cyL78Ww_LvMfBL5JMsqpOeR4-Z7uQ=='
});
}
exports.iconfont = iconfont;
function add() {
return tools.packAdmin.add();
}
exports.add = add;
function rmNodeModules() {
rimraf.sync('node_modules');
}
exports.rimraf = rmNodeModules;
function watch() {
tools.exec.execPromise('tsc');
const watcher = GulpClient.watch('src/**/*.*', { base: './' });
watcher.on('add', (path) => {
GulpClient.src(path, { base: './' }).pipe(GulpClient.dest('build'));
})
return GulpClient.src('src/**/!(package).*', { base: './src' }).pipe(GulpClient.dest('build'));
}
exports.watch = watch;
function install() {
return tools.packAdmin.install();
}
exports.default = install;
function push() {
return tools.packAdmin.push();
}
exports.push = push;
function pull() {
return tools.packAdmin.pull();
}
exports.pull = pull;
function commit() {
return tools.packAdmin.commit();
}
exports.commit = commit;
async function cowhide() {
await tools.packAdmin.pull();
await tools.packAdmin.commit();
return tools.packAdmin.push();
}
exports.cowhide = cowhide;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。