Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

21 Commits

Repository files navigation

Execution

Execution class for javascript task.

Installation

npm install execution

Usage

varExecution=require('execution');varConcat=Execution.extend({options: {separator: {description: "Concatenated input will be joined on this string.",default: process.platform==='win32' ? '\r\n' : '\n'}},execute: function(resolve){varinputs=this.inputs;varoptions=this.options;varseparator=options.separator;varcontents=inputs.map(function(record){returnrecord.contents;}).reduce(function(c1,c2){returnString(c1)+String(separator)+String(c2);})resolve({contents: contents});}});varconcat=newConcat();concat.run([{contents: 'file1'},{contents: 'file2'},{contents: 'file3'}],{separator: "+"},console,{ignore: true,timeout: 200}).then(function(res){console.log(res.contents);},function(err){console.log(err.message);});

Release History

  • 2015-03-06 0.1.6 Fix logger param is null.
  • 2015-02-05 0.1.5 Fix options merge error.
  • 2015-02-05 0.1.4 Fix custom options merge error.
  • 2014-05-19 0.1.3 Fix default option error.
  • 2014-05-19 0.1.2 Add setting param for general options.
  • 2014-03-31 0.1.1 Return the origin promise when rejected.
  • 2014-03-28 0.1.0 Initial release.

License

Copyright (c) 2014 Yuanyan Cao. Licensed under the MIT license.

About

Execution class for javascript task.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages