How to use the child_process.exec.bind function in child_process

To help you get started, we’ve selected a few child_process examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber-archive / idl / test / lib / test-cluster.js View on Github external
function git(text, opts) {
    return exec.bind(null, 'git ' + text, opts);
}
github semantic-release / semantic-release / test / registry / index.js View on Github external
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/'
}
github semantic-release / semantic-release / test / registry / index.js View on Github external
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/'
}
github chemzqm / wept / lib / parser.js View on Github external
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)) {
github wdfe / weweb / lib / parser.js View on Github external
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} 编译失败,请检查`))
            }
github sidgtl / Ping-Pong / gulpfile.js View on Github external
], 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();
        
    });

child_process

This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.

ISC
Latest version published 8 years ago

Package Health Score

65 / 100
Full package analysis