Writing Elixir Extensions
Tip: Looking at the code for the official ColdBox Elixir extensions will help immensely as you begin writing your own extensions. You can find them in the at ColdBox Elixir GitHub organization prefixed with
extension-
.
If you need more flexibility than Elixir's task
method can provide, you may create custom Elixir extensions. Elixir extensions allow you to pass arguments to your custom tasks. For example, you could write an extension like so:
That's it! Notice that your Gulp-specific logic should be placed within the function passed as the second argument to the Task
constructor. You may either place this at the top of your Gulpfile, or instead extract it to a custom tasks file. For example, if you place your extensions in elixir-extensions.js
, you may require the file from your main Gulpfile like so:
Last updated