{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"gulp-natron","type":"basic","slug":"module-gulp-natron","excerpt":"Use Natron in your Gulpfile","body":"[![Version][npm-img]][npm-url] [![Downloads][dlm-img]][npm-url]\n\n[npm-img]: https://img.shields.io/npm/v/gulp-natron.svg\n[npm-url]: https://npmjs.org/package/gulp-natron\n[dlm-img]: https://img.shields.io/npm/dm/gulp-natron.svg\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import gulp from \\\"gulp\\\";\\nimport {gulpTask, defer} from \\\"gulp-natron\\\";\\n\\nfunction greet(name) {\\n  let d = defer();\\n  console.log(`Hello ${name}.`);\\n  setTimeout(() => {\\n    d.resolve(\\\"Thanks for waiting. Goodbye.\\\");\\n  }, 1000);\\n  return d.promise;\\n}\\n\\nfunction message(msg) {\\n  console.log(msg);\\n}\\n\\nlet greetTask = gulpTask([greet, message], {\\n  options: {pipe: true},\\n});\\n\\ngulp.task(\\\"greet\\\", () => {\\n  return greetTask(\\\"World\\\");\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ gulp greet\\n[11:15:00] Using gulpfile ~/gulpfile.js\\n[11:15:00] Starting 'greet'...\\n[11:15:00] Starting '<TaskSequence_0>'...\\n[11:15:00] Starting ':greet'...\\nHello World.\\n[11:15:01] Finished ':greet' after 1 s\\n[11:15:01] Starting ':message'...\\nThanks for waiting. Goodbye.\\n[11:15:01] Finished ':message' after 436 μs\\n[11:15:01] Finished '<TaskSequence_0>' after 1.01 s\\n[11:15:01] Finished 'greet' after 1.01 s\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Natron Core\",\n  \"body\": \"This module exports `task`, `promisify`, `defer`, `Task` and `TaskContext` from [`natron-core`](doc:module-natron-core).\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"This module exports `merge`, `awaitAll` and `fromPromise` from [`natron-vinyl`](doc:module-natron-vinyl).\",\n  \"title\": \"Natron Vinyl Utilities\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Vinyl Transformer\",\n  \"body\": \"This module exports `transformer` and `Transformer` from [`vinyl-transformer`](doc:module-vinyl-transformer).\"\n}\n[/block]","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5651055ea8567917000f71e9","version":{"version":"0.2","version_clean":"0.2.0","codename":"Orange Arrow","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["5619a39a13874c0d007038ea","5619a39a13874c0d007038eb","5619a39a13874c0d007038ec","5619a39a13874c0d007038ed","5651062a3b4d113500ed22d1","5651c89a852cfb3500a69830","565505ad055aa40d006f0ca7","56c219d8d3199a0d00694be6"],"_id":"5619a39913874c0d007038e9","createdAt":"2015-10-10T23:47:37.777Z","project":"5617a1f5a410c90d00c612f5","__v":5,"releaseDate":"2015-10-10T23:47:37.777Z"},"createdAt":"2015-11-21T23:59:26.762Z","githubsync":"","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Other Modules","slug":"other-modules","order":9999,"from_sync":false,"reference":false,"_id":"56c219d8d3199a0d00694be6","project":"5617a1f5a410c90d00c612f5","createdAt":"2016-02-15T18:32:56.618Z","__v":0,"version":"5619a39913874c0d007038e9"},"project":"5617a1f5a410c90d00c612f5","user":"5617a0a4a410c90d00c612f4","__v":13}

gulp-natron

Use Natron in your Gulpfile

[![Version][npm-img]][npm-url] [![Downloads][dlm-img]][npm-url] [npm-img]: https://img.shields.io/npm/v/gulp-natron.svg [npm-url]: https://npmjs.org/package/gulp-natron [dlm-img]: https://img.shields.io/npm/dm/gulp-natron.svg [block:code] { "codes": [ { "code": "import gulp from \"gulp\";\nimport {gulpTask, defer} from \"gulp-natron\";\n\nfunction greet(name) {\n let d = defer();\n console.log(`Hello ${name}.`);\n setTimeout(() => {\n d.resolve(\"Thanks for waiting. Goodbye.\");\n }, 1000);\n return d.promise;\n}\n\nfunction message(msg) {\n console.log(msg);\n}\n\nlet greetTask = gulpTask([greet, message], {\n options: {pipe: true},\n});\n\ngulp.task(\"greet\", () => {\n return greetTask(\"World\");\n});", "language": "javascript" } ] } [/block] [block:code] { "codes": [ { "code": "$ gulp greet\n[11:15:00] Using gulpfile ~/gulpfile.js\n[11:15:00] Starting 'greet'...\n[11:15:00] Starting '<TaskSequence_0>'...\n[11:15:00] Starting ':greet'...\nHello World.\n[11:15:01] Finished ':greet' after 1 s\n[11:15:01] Starting ':message'...\nThanks for waiting. Goodbye.\n[11:15:01] Finished ':message' after 436 μs\n[11:15:01] Finished '<TaskSequence_0>' after 1.01 s\n[11:15:01] Finished 'greet' after 1.01 s", "language": "text" } ] } [/block] [block:callout] { "type": "info", "title": "Natron Core", "body": "This module exports `task`, `promisify`, `defer`, `Task` and `TaskContext` from [`natron-core`](doc:module-natron-core)." } [/block] [block:callout] { "type": "info", "body": "This module exports `merge`, `awaitAll` and `fromPromise` from [`natron-vinyl`](doc:module-natron-vinyl).", "title": "Natron Vinyl Utilities" } [/block] [block:callout] { "type": "info", "title": "Vinyl Transformer", "body": "This module exports `transformer` and `Transformer` from [`vinyl-transformer`](doc:module-vinyl-transformer)." } [/block]