Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function git(text, opts) {
return exec.bind(null, 'git ' + text, opts);
}
var exec = require('child_process').exec
var opts = {
cwd: __dirname
}
module.exports = {
start: exec.bind(null, './start.sh', opts),
stop: exec.bind(null, './stop.sh', opts),
uri: 'http://localhost:' + (process.env.TRAVIS === 'true' ? 5984 : 15986) + '/registry/_design/app/_rewrite/'
}
var exec = require('child_process').exec
var opts = {
cwd: __dirname
}
module.exports = {
start: exec.bind(null, './start.sh', opts),
stop: exec.bind(null, './stop.sh', opts),
uri: 'http://localhost:' + (process.env.TRAVIS === 'true' ? 5984 : 15986) + '/registry/_design/app/_rewrite/'
}
parseImports(full_path, true, (err, srcs) => {
if (err) return reject(err)
cache.setWxssMap(srcs)
let execWcsc = execFile.bind(null, wcsc, wxss_args.concat(srcs))
if (isLinux) {
execWcsc = exec.bind(null, [wcsc].concat(wxss_args).concat(srcs).join(' '))
}
execWcsc({maxBuffer: 1024 * 600}, (err, stdout, stderr) => {
if (err) {
console.error(err.stack)
return reject(new Error(`${full_path} 编译失败,请检查`))
}
if (stderr) return reject(new Error(stderr))
wxssSourcemap(full_path, stdout).then(content => {
cache[full_path] = content
resolve(content)
}, reject)
})
})
} else if (/\.js$/.test(full_path)) {
parseImports(fullPath, false, (err, srcs) => {
if (err) return reject(err)
const wxmlCmpRes = wxmlTranspiler.wxmlCompile(srcs)
const tagsInCode = wxmlCmpRes.tags
if (useDefaultCompiler) {
let execWcc = execFile.bind(null, wcc, wxmlArgs.concat(srcs))
if (isLinux) {
execWcc = exec.bind(
null,
[wcc]
.concat(wxmlArgs)
.concat(srcs)
.join(' ')
)
}
if (wxmlMsgFlag) {
console.log(chalk.yellow('Using wcc.exe to transpile wxml:'))
wxmlMsgFlag = 0
}
execWcc({ maxBuffer: 1024 * 600 }, (err, stdout, stderr) => {
if (err) {
console.error(err.stack)
return reject(new Error(`${fullPath} 编译失败,请检查`))
}
], function() {
var updateSprite = exec.bind(undefined, 'audiosprite --format howler --path build/ --output ui/public/build/sprite --export mp3 ui/public/sounds/*.mp3 ui/public/sounds/*.wav', cb);
if(downloads.length > 0) {
return es.merge.apply(undefined, downloads).on('end', function() {
updateSprite();
});
}
updateSprite();
});