{"_id":"transform-runner","_rev":"164358","name":"transform-runner","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","dist-tags":{"latest":"0.1.5"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"time":{"modified":"2021-06-03T11:43:51.000Z","created":"2014-06-04T18:57:14.141Z","0.1.5":"2014-07-08T23:13:37.853Z","0.1.4":"2014-07-03T22:42:10.852Z","0.1.3":"2014-06-24T22:17:06.139Z","0.1.2":"2014-06-23T23:53:59.682Z","0.1.1":"2014-06-23T22:57:21.808Z","0.1.0":"2014-06-23T22:35:13.074Z","0.0.0":"2014-06-04T18:57:14.141Z"},"users":{},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"repository":{"type":"git","url":"git://github.com/mixu/transform-runner.git"},"versions":{"0.1.5":{"name":"transform-runner","version":"0.1.5","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","repository":{"type":"git","url":"git://github.com/mixu/transform-runner.git"},"dependencies":{"amd-resolve":"~0.1.1","amdetective":"0.0.2","browser-resolve":"~1.3.0","detective":"~3.1.0","file-dedupe":"0.0.5","microee":"0.0.5","miniq":"~0.1.2","resolve":"~0.7.1"},"gitHead":"6c06ebb73e1e7ccd3d268011f02878817300402a","bugs":{"url":"https://github.com/mixu/transform-runner/issues"},"homepage":"https://github.com/mixu/transform-runner","_id":"transform-runner@0.1.5","_shasum":"756082d714ad68c478aa7db74846a22539334e2e","_from":".","_npmVersion":"1.4.20","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"dist":{"shasum":"756082d714ad68c478aa7db74846a22539334e2e","size":8401,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.1.5.tgz"},"directories":{},"publish_time":1404861217853,"_cnpm_publish_time":1404861217853,"_hasShrinkwrap":false},"0.1.4":{"name":"transform-runner","version":"0.1.4","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","repository":{"type":"git","url":"git://github.com/mixu/transform-runner.git"},"dependencies":{"amd-resolve":"~0.1.1","amdetective":"0.0.2","browser-resolve":"~1.3.0","detective":"~3.1.0","file-dedupe":"0.0.5","microee":"0.0.5","miniq":"~0.1.2","resolve":"~0.7.1"},"gitHead":"27ce3c76d5bffb8e339e2cd62ff6c6d0badd7599","bugs":{"url":"https://github.com/mixu/transform-runner/issues"},"homepage":"https://github.com/mixu/transform-runner","_id":"transform-runner@0.1.4","_shasum":"a87d417ffdfc363e61547ce78ffd9ebdab945ae6","_from":".","_npmVersion":"1.4.20","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"dist":{"shasum":"a87d417ffdfc363e61547ce78ffd9ebdab945ae6","size":8427,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.1.4.tgz"},"directories":{},"publish_time":1404427330852,"_cnpm_publish_time":1404427330852,"_hasShrinkwrap":false},"0.1.3":{"name":"transform-runner","version":"0.1.3","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","repository":{"type":"git","url":"git://github.com/mixu/transform-runner.git"},"dependencies":{"amd-resolve":"~0.1.1","amdetective":"0.0.2","browser-resolve":"~1.3.0","detective":"~3.1.0","file-dedupe":"0.0.5","microee":"0.0.5","miniq":"~0.1.2","resolve":"~0.7.1"},"gitHead":"a948f1cb70c23bf612088281908e4cdcee44c4c2","bugs":{"url":"https://github.com/mixu/transform-runner/issues"},"homepage":"https://github.com/mixu/transform-runner","_id":"transform-runner@0.1.3","_shasum":"5a4cc4cc33407f9e852f52053e6042b2eb841ce4","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"dist":{"shasum":"5a4cc4cc33407f9e852f52053e6042b2eb841ce4","size":8488,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.1.3.tgz"},"directories":{},"publish_time":1403648226139,"_cnpm_publish_time":1403648226139,"_hasShrinkwrap":false},"0.1.2":{"name":"transform-runner","version":"0.1.2","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","repository":{"type":"git","url":"git://github.com/mixu/transform-runner.git"},"dependencies":{"amd-resolve":"~0.1.1","amdetective":"0.0.2","browser-resolve":"~1.3.0","detective":"~3.1.0","file-dedupe":"0.0.5","microee":"0.0.5","miniq":"~0.1.2","resolve":"~0.7.1"},"gitHead":"d4461878a6fb8db1160d65f620192a9d74ea31f5","bugs":{"url":"https://github.com/mixu/transform-runner/issues"},"homepage":"https://github.com/mixu/transform-runner","_id":"transform-runner@0.1.2","_shasum":"d425a28622fbdc15d85f62594d4e95829870ee25","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"dist":{"shasum":"d425a28622fbdc15d85f62594d4e95829870ee25","size":8321,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.1.2.tgz"},"directories":{},"publish_time":1403567639682,"_cnpm_publish_time":1403567639682,"_hasShrinkwrap":false},"0.1.1":{"name":"transform-runner","version":"0.1.1","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","dependencies":{"amd-resolve":"~0.1.1","amdetective":"0.0.2","browser-resolve":"~1.3.0","detective":"~3.1.0","file-dedupe":"0.0.5","microee":"0.0.5","miniq":"0.1.1","resolve":"~0.7.1"},"gitHead":"3e3f7c0096c7196634b99d8f634e9cd1fa9e93e2","_id":"transform-runner@0.1.1","_shasum":"a9fcb553fb5b926744884aa5fc2cc2b9bfb5df45","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"dist":{"shasum":"a9fcb553fb5b926744884aa5fc2cc2b9bfb5df45","size":8278,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.1.1.tgz"},"directories":{},"publish_time":1403564241808,"_cnpm_publish_time":1403564241808,"_hasShrinkwrap":false},"0.1.0":{"name":"transform-runner","version":"0.1.0","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","dependencies":{"amd-resolve":"~0.1.1","amdetective":"0.0.2","browser-resolve":"~1.3.0","detective":"~3.1.0","file-dedupe":"0.0.4","microee":"0.0.5","miniq":"0.1.1","resolve":"~0.7.1"},"_id":"transform-runner@0.1.0","dist":{"shasum":"788b0e3c618d15e63b7e20b9e5a243115019f361","size":8283,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1403562913074,"_cnpm_publish_time":1403562913074,"_hasShrinkwrap":false},"0.0.0":{"name":"transform-runner","version":"0.0.0","description":"Accepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Mikito Takada","email":"mikito.takada@gmail.com","url":"http://mixu.net/"},"license":"BSD","dependencies":{"browser-resolve":"^1.2.4","detective":"^3.1.0","microee":"0.0.5","minilog":"^2.0.5","miniq":"0.0.1","resolve":"^0.7.0"},"_id":"transform-runner@0.0.0","dist":{"shasum":"cb6e994b465a6a832118775b6f4aa5c0bd01d953","size":6330,"noattachment":false,"key":"/transform-runner/-/transform-runner-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/transform-runner/download/transform-runner-0.0.0.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1401908234141,"_cnpm_publish_time":1401908234141,"_hasShrinkwrap":false}},"readme":"# transform-runner\n\nAccepts a set of files, applies transformations to them and returns JSON output which can be converted into a package.\n\n## Usage\n\n    var runner = require('transform-runner');\n\n    var runner = runTasks({\n      // new API\n      tasks: function(filename, done) {\n        return false; // return true if you queue'd tasks\n      },\n\n      log: Minilog('runner'),\n      include: [ '/home/foo/index.js' ],\n      exclude: [\n        // /^.+(?!\\.js).{3}$/i,\n        '/home/foo/node_modules',\n      ],\n      jobs: require('os').cpus().length * 2,\n      log: {\n        info: function() {},\n        log: console.log.bind(console),\n        error: console.error.bind(console)\n      }\n    }, function(err, files) {\n      if (onDone) {\n        onDone(err, files, runner);\n      }\n    });\n    runner.on('parse-error', function(err) {\n      console.log('error', err);\n    });\n    runner.on('file', function(filename) {\n      console.log('file', filename);\n    });\n    runner.on('hit', function(filename) {\n      console.log('hit', filename);\n    });\n    runner.on('miss', function(filename) {\n      console.log('miss', filename);\n    });\n    runner.on('file-done', function(filename, item) {\n      console.log('file-done', filename, item);\n    });\n\n## API\n\n### runner(files, opts = {})\n\n`opts`:\n\n- `exclude`: a function which takes a single parameter (the full file path) and returns true if the file should be excluded\n- `ignore`: a function which takes a single parameter (the full file path) and returns true if the file should be ignored\n- `tasks(file, done)`: a function; the done function should be called with `err` and the full path to the result of the task execution when done\n- `cache`: an object with the following methods:\n  - `get(file)`: takes a single parameter (the full file path) and returns either an object containing the cached metadata, or false if there is no cached value\n  - `set(file, key, value)`\n- `log`: an object that looks like the `console` API, with the following methods:\n  - `.info()`: log a debug message (works both in the browser and in Node, unlike .debug)\n  - `.log()`: log a informational message\n  - `.error()`: log a error message\n\n## Include, exclude etc.\n\nUnlike most build systems, `transform-runner` does not use `node-glob` because it is slow on moderately-sized trees.\n\nAll path specifications are resolved as follows:\n\n- paths beginning with `.` or `/` are resolved against the file system. Relative paths are resolved based on the base path.\n- `--include-regexp`, `--exclude-regexp` and `--ignore-regexp` values are parsed as regular expressions using `new RegExp`. They should be quoted if passed in through the command line to avoid the shell from expanding special characters.\n- There are three kinds of specifications:\n  - includes are resolved first to produce a set of initial files\n  - excludes are applied against any matching files, matched files are excluded\n  - actions are resolved against the result from the includes after applying exclusions.\n","_attachments":{},"homepage":"https://github.com/mixu/transform-runner","bugs":{"url":"https://github.com/mixu/transform-runner/issues"},"license":"BSD"}