我正在尝试缩小我的脚本文件,我正在使用gulp任务运行器而我正在尝试gulp-uglify插件
码:
gulp.task('concat', function() {
return gulp.src('app/**/*.js')
// .pipe(concat('script.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist/'))
});
Run Code Online (Sandbox Code Playgroud)
但我得到的错误是
当我尝试运行gulp任务作为gulp concat任何帮助将不胜感激
我无法使用 nodemailer 在邮件中发送 html 文本。
exports.send = function(req, res) {
console.log(req.query);
var mailOptions = {
to: req.query.email,
subject: req.query.sub,
text: 'Date of Interview: ' + req.query.dateOfInterview+ 'Time of Interview: ' + req.query.timeOfInterview + '' + req.query.assignedTechnicalPerson + '' + req.query.typeOfInterview + '' + req.query.interviewLocation
}
smtpTransport.sendMail(mailOptions, function(error, response) {
if (error) {
console.log(error);
res.end("error");
} else {
console.log("Message sent: " + response.message);
res.end("sent");
}
});
Run Code Online (Sandbox Code Playgroud)
};
我收到的邮件是没有任何行空间的连续文本 如何使用其中的 html 标签发送相同的文本 我也尝试保留 html 并最终收到很多错误
请告诉我正确的语法
任何帮助表示赞赏
我需要更新一些我正在使用 mongoose 驱动程序和 express js 的字段
架构:
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var ProfilesSchema = new Schema({
presentRound: {
type: Number,
default: 1
},
scheduleInterviewStatus: {
type: Boolean,
default: false
},
interviewStatus: String,
ratings: [{
round: Number,
rating: Number,
feedback: String,
interviewer: String,
roundStatus: String
}]
});
Run Code Online (Sandbox Code Playgroud)
module.exports = mongoose.model('Profiles', ProfilesSchema);
所以在这些我需要通过 idpresentRound scheduleInterviewStatus interviewStatus和roundStatus(in ratings array by matching round number)
更新前:
presentRound: 1,
scheduleInterviewStatus: true,
interviewStatus: "on-hold",
ratings: [{
round: 1,
rating: 3,
feedback: …Run Code Online (Sandbox Code Playgroud) express ×2
javascript ×2
node.js ×2
gulp ×1
gulp-uglify ×1
mongodb ×1
mongoose ×1
nodemailer ×1