{"_id":"5651055ea8567917000f71e9","version":{"_id":"5619a39913874c0d007038e9","project":"5617a1f5a410c90d00c612f5","__v":5,"createdAt":"2015-10-10T23:47:37.777Z","releaseDate":"2015-10-10T23:47:37.777Z","categories":["5619a39a13874c0d007038ea","5619a39a13874c0d007038eb","5619a39a13874c0d007038ec","5619a39a13874c0d007038ed","5651062a3b4d113500ed22d1","5651c89a852cfb3500a69830","565505ad055aa40d006f0ca7","56c219d8d3199a0d00694be6"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"Orange Arrow","version_clean":"0.2.0","version":"0.2"},"githubsync":"","category":{"_id":"56c219d8d3199a0d00694be6","project":"5617a1f5a410c90d00c612f5","__v":0,"version":"5619a39913874c0d007038e9","pages":[],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-15T18:32:56.618Z","from_sync":false,"order":9999,"slug":"other-modules","title":"Other Modules"},"project":"5617a1f5a410c90d00c612f5","user":"5617a0a4a410c90d00c612f4","__v":13,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-21T23:59:26.762Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"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]","excerpt":"Use Natron in your Gulpfile","slug":"module-gulp-natron","type":"basic","title":"gulp-natron"}

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]