This commit is contained in:
Ken 2018-12-10 13:49:51 -08:00
Родитель aa465dfd95
Коммит 2de8128e8a
13 изменённых файлов: 127 добавлений и 19 удалений

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Command line arguments · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; uses the best pirate themed command line argument library ever: &lt;code&gt;yargs&lt;/code&gt;, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. &lt;code&gt;just-task&lt;/code&gt; exposes these via &lt;code&gt;this.argv&lt;/code&gt; inside a task function.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Command line arguments · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; uses the best pirate themed command line argument library ever: &lt;code&gt;yargs&lt;/code&gt;, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. &lt;code&gt;just-task&lt;/code&gt; exposes these via &lt;code&gt;this.argv&lt;/code&gt; inside a task function.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
@ -49,4 +49,4 @@ task(<span class="hljs-string">'blimey'</span>, <span class="hljs-string">'An ex
<pre><code class="hljs">rig <span class="hljs-comment">--help</span>
rig blimey <span class="hljs-comment">--help</span>
</code></pre>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/logging"><span class="arrow-prev"></span><span>Logging</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#reading-arguments">Reading arguments</a></li><li><a href="#describe-the-task-with-option">Describe the task with <code>option()</code></a></li><li><a href="#automatically-generated-task-help-usage">Automatically Generated Task Help Usage</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/logging"><span class="arrow-prev"></span><span>Logging</span></a><a class="docs-next button" href="/just-task/docs/condition"><span>Conditionals</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#reading-arguments">Reading arguments</a></li><li><a href="#describe-the-task-with-option">Describe the task with <code>option()</code></a></li><li><a href="#automatically-generated-task-help-usage">Automatically Generated Task Help Usage</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Command line arguments · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; uses the best pirate themed command line argument library ever: &lt;code&gt;yargs&lt;/code&gt;, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. &lt;code&gt;just-task&lt;/code&gt; exposes these via &lt;code&gt;this.argv&lt;/code&gt; inside a task function.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Command line arguments · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; uses the best pirate themed command line argument library ever: &lt;code&gt;yargs&lt;/code&gt;, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. &lt;code&gt;just-task&lt;/code&gt; exposes these via &lt;code&gt;this.argv&lt;/code&gt; inside a task function.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
@ -49,4 +49,4 @@ task(<span class="hljs-string">'blimey'</span>, <span class="hljs-string">'An ex
<pre><code class="hljs">rig <span class="hljs-comment">--help</span>
rig blimey <span class="hljs-comment">--help</span>
</code></pre>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/logging"><span class="arrow-prev"></span><span>Logging</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#reading-arguments">Reading arguments</a></li><li><a href="#describe-the-task-with-option">Describe the task with <code>option()</code></a></li><li><a href="#automatically-generated-task-help-usage">Automatically Generated Task Help Usage</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/logging"><span class="arrow-prev"></span><span>Logging</span></a><a class="docs-next button" href="/just-task/docs/condition"><span>Conditionals</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#reading-arguments">Reading arguments</a></li><li><a href="#describe-the-task-with-option">Describe the task with <code>option()</code></a></li><li><a href="#automatically-generated-task-help-usage">Automatically Generated Task Help Usage</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Composition of tasks · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason &lt;code&gt;just-task&lt;/code&gt; is made. It simplifies the composition of tasks.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Composition of tasks · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason &lt;code&gt;just-task&lt;/code&gt; is made. It simplifies the composition of tasks.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Composition of tasks · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason &lt;code&gt;just-task&lt;/code&gt; is made. It simplifies the composition of tasks.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Composition of tasks · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason &lt;code&gt;just-task&lt;/code&gt; is made. It simplifies the composition of tasks.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');

Просмотреть файл

@ -1,6 +1,33 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Controlling Task Flow with Conditionals · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Sometimes a &lt;code&gt;just-task.js&lt;/code&gt; would include tasks that are skipped depending on the arguments that are given. Use a &lt;code&gt;condition()&lt;/code&gt; function to decide to run a task or to skip it.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Controlling Task Flow with Conditionals · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;Sometimes a &lt;code&gt;just-task.js&lt;/code&gt; would include tasks that are skipped depending on the arguments that are given. Use a &lt;code&gt;condition()&lt;/code&gt; function to decide to run a task or to skip it.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/condition.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Controlling Task Flow with Conditionals</h1></header><article><div><span><p>Sometimes a <code>just-task.js</code> would include tasks that are skipped depending on the arguments that are given. Use a <code>condition()</code> function to decide to run a task or to skip it.</p>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
const headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
if (event.target.tagName === 'A') {
document.body.classList.remove('tocActive');
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/condition.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Controlling Task Flow with Conditionals</h1></header><article><div><span><p>Sometimes a <code>just-task.js</code> would include tasks that are skipped depending on the arguments that are given. Use a <code>condition()</code> function to decide to run a task or to skip it.</p>
<h2><a class="anchor" aria-hidden="true" id="running-tasks-in-a-series"></a><a href="#running-tasks-in-a-series" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Running tasks in a series</h2>
<p>As we have seen, tasks can be run in a series.</p>
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> { task, series } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task'</span>);
@ -44,4 +71,4 @@ task(<span class="hljs-string">'build'</span>, series(<span class="hljs-string">
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="next-steps"></a><a href="#next-steps" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Next Steps</h2>
<p>Learn about <a href="/just-task/docs/thunk">higher order task function</a></p>
</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#running-tasks-in-a-series">Running tasks in a series</a></li><li><a href="#next-steps">Next Steps</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/args"><span class="arrow-prev"></span><span>Command line arguments</span></a><a class="docs-next button" href="/just-task/docs/thunk"><span>Higher Order Task Functions</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#running-tasks-in-a-series">Running tasks in a series</a></li><li><a href="#next-steps">Next Steps</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>

Просмотреть файл

@ -1,6 +1,33 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Controlling Task Flow with Conditionals · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Sometimes a &lt;code&gt;just-task.js&lt;/code&gt; would include tasks that are skipped depending on the arguments that are given. Use a &lt;code&gt;condition()&lt;/code&gt; function to decide to run a task or to skip it.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Controlling Task Flow with Conditionals · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;Sometimes a &lt;code&gt;just-task.js&lt;/code&gt; would include tasks that are skipped depending on the arguments that are given. Use a &lt;code&gt;condition()&lt;/code&gt; function to decide to run a task or to skip it.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/condition.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Controlling Task Flow with Conditionals</h1></header><article><div><span><p>Sometimes a <code>just-task.js</code> would include tasks that are skipped depending on the arguments that are given. Use a <code>condition()</code> function to decide to run a task or to skip it.</p>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
const headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
if (event.target.tagName === 'A') {
document.body.classList.remove('tocActive');
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/condition.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Controlling Task Flow with Conditionals</h1></header><article><div><span><p>Sometimes a <code>just-task.js</code> would include tasks that are skipped depending on the arguments that are given. Use a <code>condition()</code> function to decide to run a task or to skip it.</p>
<h2><a class="anchor" aria-hidden="true" id="running-tasks-in-a-series"></a><a href="#running-tasks-in-a-series" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Running tasks in a series</h2>
<p>As we have seen, tasks can be run in a series.</p>
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> { task, series } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task'</span>);
@ -44,4 +71,4 @@ task(<span class="hljs-string">'build'</span>, series(<span class="hljs-string">
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="next-steps"></a><a href="#next-steps" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Next Steps</h2>
<p>Learn about <a href="/just-task/docs/thunk">higher order task function</a></p>
</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#running-tasks-in-a-series">Running tasks in a series</a></li><li><a href="#next-steps">Next Steps</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/args"><span class="arrow-prev"></span><span>Command line arguments</span></a><a class="docs-next button" href="/just-task/docs/thunk"><span>Higher Order Task Functions</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#running-tasks-in-a-series">Running tasks in a series</a></li><li><a href="#next-steps">Next Steps</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Getting Started with Just ____ · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;&lt;code&gt;Just&lt;/code&gt; is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Getting Started with Just ____ · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;&lt;code&gt;Just&lt;/code&gt; is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive siteNavItemActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive siteNavItemActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Getting Started with Just ____ · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;&lt;code&gt;Just&lt;/code&gt; is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Getting Started with Just ____ · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;&lt;code&gt;Just&lt;/code&gt; is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive siteNavItemActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive siteNavItemActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Logging · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; is simple, but it is opinionated. One of the built-in capabilities of &lt;code&gt;just-task&lt;/code&gt; is logging. We feel that this is an important enough of a feature to be available by the library.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Logging · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; is simple, but it is opinionated. One of the built-in capabilities of &lt;code&gt;just-task&lt;/code&gt; is logging. We feel that this is an important enough of a feature to be available by the library.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Logging · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; is simple, but it is opinionated. One of the built-in capabilities of &lt;code&gt;just-task&lt;/code&gt; is logging. We feel that this is an important enough of a feature to be available by the library.&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Logging · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;&lt;code&gt;just-task&lt;/code&gt; is simple, but it is opinionated. One of the built-in capabilities of &lt;code&gt;just-task&lt;/code&gt; is logging. We feel that this is an important enough of a feature to be available by the library.&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li></ul></div></div></section></div><script>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');

Просмотреть файл

@ -1,6 +1,33 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Higher Order Task Functions · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the &lt;code&gt;just-task-preset&lt;/code&gt; package includes useful collection of task functions like &lt;code&gt;tscTask&lt;/code&gt;. However, these tasks tend of be very generic. &lt;code&gt;tscTask()&lt;/code&gt; is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called &lt;code&gt;thunk&lt;/code&gt; to create a task function that creates a task function on the fly!&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Higher Order Task Functions · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the &lt;code&gt;just-task-preset&lt;/code&gt; package includes useful collection of task functions like &lt;code&gt;tscTask&lt;/code&gt;. However, these tasks tend of be very generic. &lt;code&gt;tscTask()&lt;/code&gt; is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called &lt;code&gt;thunk&lt;/code&gt; to create a task function that creates a task function on the fly!&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/thunk.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Higher Order Task Functions</h1></header><article><div><span><p>When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the <code>just-task-preset</code> package includes useful collection of task functions like <code>tscTask</code>. However, these tasks tend of be very generic. <code>tscTask()</code> is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called <code>thunk</code> to create a task function that creates a task function on the fly!</p>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
const headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
if (event.target.tagName === 'A') {
document.body.classList.remove('tocActive');
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/thunk.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Higher Order Task Functions</h1></header><article><div><span><p>When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the <code>just-task-preset</code> package includes useful collection of task functions like <code>tscTask</code>. However, these tasks tend of be very generic. <code>tscTask()</code> is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called <code>thunk</code> to create a task function that creates a task function on the fly!</p>
<p>Here is an example of a simple usage of a preset task function factory:</p>
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> { task } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task'</span>);
<span class="hljs-keyword">const</span> { tscTask } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task-preset'</span>);
@ -21,4 +48,4 @@ task(<span class="hljs-string">'build'</span>, thunk(<span class="hljs-function"
<pre><code class="hljs css language-sh">$ just build --amd
$ just build --commonjs
</code></pre>
</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/condition"><span class="arrow-prev"></span><span>Conditionals</span></a></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>

Просмотреть файл

@ -1,6 +1,33 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Higher Order Task Functions · Just ____</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the &lt;code&gt;just-task-preset&lt;/code&gt; package includes useful collection of task functions like &lt;code&gt;tscTask&lt;/code&gt;. However, these tasks tend of be very generic. &lt;code&gt;tscTask()&lt;/code&gt; is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called &lt;code&gt;thunk&lt;/code&gt; to create a task function that creates a task function on the fly!&lt;/p&gt;
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Higher Order Task Functions · Just ____"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kenotron.github.io/just-task/index.html"/><meta property="og:description" content="&lt;p&gt;When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the &lt;code&gt;just-task-preset&lt;/code&gt; package includes useful collection of task functions like &lt;code&gt;tscTask&lt;/code&gt;. However, these tasks tend of be very generic. &lt;code&gt;tscTask()&lt;/code&gt; is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called &lt;code&gt;thunk&lt;/code&gt; to create a task function that creates a task function on the fly!&lt;/p&gt;
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/thunk.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Higher Order Task Functions</h1></header><article><div><span><p>When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the <code>just-task-preset</code> package includes useful collection of task functions like <code>tscTask</code>. However, these tasks tend of be very generic. <code>tscTask()</code> is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called <code>thunk</code> to create a task function that creates a task function on the fly!</p>
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/just-task/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/just-task/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/just-task/"><h2 class="headerTitle">Just ____</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/just-task/docs/doc-start" target="_self">Documentation</a></li><li class=""><a href="/just-task/help" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Documentation</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Documentation</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/doc-start">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/composition">Composition of tasks</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/logging">Logging</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/args">Command line arguments</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/condition">Conditionals</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/just-task/docs/thunk">Higher Order Task Functions</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
const headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
if (event.target.tagName === 'A') {
document.body.classList.remove('tocActive');
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/thunk.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Higher Order Task Functions</h1></header><article><div><span><p>When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the <code>just-task-preset</code> package includes useful collection of task functions like <code>tscTask</code>. However, these tasks tend of be very generic. <code>tscTask()</code> is a task function factory. Calling it will generate a task function. But sometimes a preconfigured task function is needed. We will use a concept called <code>thunk</code> to create a task function that creates a task function on the fly!</p>
<p>Here is an example of a simple usage of a preset task function factory:</p>
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> { task } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task'</span>);
<span class="hljs-keyword">const</span> { tscTask } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task-preset'</span>);
@ -21,4 +48,4 @@ task(<span class="hljs-string">'build'</span>, thunk(<span class="hljs-function"
<pre><code class="hljs css language-sh">$ just build --amd
$ just build --commonjs
</code></pre>
</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/just-task/docs/condition"><span class="arrow-prev"></span><span>Conditionals</span></a></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2018</section></footer></div></body></html>

Просмотреть файл

@ -1,5 +1,5 @@
{
"docs": {
"Documentation": ["doc-start", "composition", "logging", "args"]
"Documentation": ["doc-start", "composition", "logging", "args", "condition", "thunk"]
}
}