зеркало из https://github.com/microsoft/just.git
updating getting started doc to encourage local installs instead of global
This commit is contained in:
Родитель
ecb0dcdc26
Коммит
ff6f242852
|
@ -1,5 +1,5 @@
|
|||
<!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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.</p>
|
||||
"/><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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.</p>
|
||||
<!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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make <code>just</code> available locally instead of installing <code>just</code> as a global tool.</p>
|
||||
"/><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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make <code>just</code> available locally instead of installing <code>just</code> as a global tool.</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 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>Basics</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Basics</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 class="navGroup"><h3 class="navGroupCategoryTitle">Presets</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/presets">Task Presets</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/preset-ts">Typescript</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/preset-jest">Jest</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/preset-tslint">Typescript Lint</a></li></ul></div></div></section></div><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
|
@ -27,8 +27,8 @@
|
|||
};
|
||||
}
|
||||
});
|
||||
</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/doc-start.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Getting Started with Just ____</h1></header><article><div><span><p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.</p>
|
||||
<pre><code class="hljs css language-sh">npm i -g just-task
|
||||
</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/doc-start.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Getting Started with Just ____</h1></header><article><div><span><p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make <code>just</code> available locally instead of installing <code>just</code> as a global tool.</p>
|
||||
<pre><code class="hljs css language-sh">npm i -D just-task
|
||||
</code></pre>
|
||||
<p>Place some task definitions inside <code>just-task.js</code> in your root folder (next to package.json):</p>
|
||||
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> { task, option, logger, argv } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task'</span>);
|
||||
|
@ -39,9 +39,9 @@ task(<span class="hljs-string">'sayhello'</span>, <span class="hljs-function"><s
|
|||
logger.info(argv().name);
|
||||
});
|
||||
</code></pre>
|
||||
<p>Then run it!</p>
|
||||
<pre><code class="hljs css language-sh">$ just sayhello
|
||||
$ just sayhello --name me
|
||||
<p>Then run it! It is best to either place <code>just</code> inside a npm run script or run it with <code>npx</code>:</p>
|
||||
<pre><code class="hljs css language-sh">$ npx just sayhello
|
||||
$ npx just sayhello --name me
|
||||
</code></pre>
|
||||
<p>That's all!</p>
|
||||
<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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.</p>
|
||||
"/><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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.</p>
|
||||
<!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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make <code>just</code> available locally instead of installing <code>just</code> as a global tool.</p>
|
||||
"/><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="<p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make <code>just</code> available locally instead of installing <code>just</code> as a global tool.</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 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>Basics</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Basics</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 class="navGroup"><h3 class="navGroupCategoryTitle">Presets</h3><ul><li class="navListItem"><a class="navItem" href="/just-task/docs/presets">Task Presets</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/preset-ts">Typescript</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/preset-jest">Jest</a></li><li class="navListItem"><a class="navItem" href="/just-task/docs/preset-tslint">Typescript Lint</a></li></ul></div></div></section></div><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
|
@ -27,8 +27,8 @@
|
|||
};
|
||||
}
|
||||
});
|
||||
</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/doc-start.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Getting Started with Just ____</h1></header><article><div><span><p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.</p>
|
||||
<pre><code class="hljs css language-sh">npm i -g just-task
|
||||
</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/doc-start.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Getting Started with Just ____</h1></header><article><div><span><p><code>Just</code> is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make <code>just</code> available locally instead of installing <code>just</code> as a global tool.</p>
|
||||
<pre><code class="hljs css language-sh">npm i -D just-task
|
||||
</code></pre>
|
||||
<p>Place some task definitions inside <code>just-task.js</code> in your root folder (next to package.json):</p>
|
||||
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> { task, option, logger, argv } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'just-task'</span>);
|
||||
|
@ -39,9 +39,9 @@ task(<span class="hljs-string">'sayhello'</span>, <span class="hljs-function"><s
|
|||
logger.info(argv().name);
|
||||
});
|
||||
</code></pre>
|
||||
<p>Then run it!</p>
|
||||
<pre><code class="hljs css language-sh">$ just sayhello
|
||||
$ just sayhello --name me
|
||||
<p>Then run it! It is best to either place <code>just</code> inside a npm run script or run it with <code>npx</code>:</p>
|
||||
<pre><code class="hljs css language-sh">$ npx just sayhello
|
||||
$ npx just sayhello --name me
|
||||
</code></pre>
|
||||
<p>That's all!</p>
|
||||
<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>
|
||||
|
|
|
@ -4,10 +4,10 @@ title: Getting Started with Just ____
|
|||
sidebar_label: Getting Started
|
||||
---
|
||||
|
||||
`Just` is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs.
|
||||
`Just` is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make `just` available locally instead of installing `just` as a global tool.
|
||||
|
||||
```sh
|
||||
npm i -g just-task
|
||||
npm i -D just-task
|
||||
```
|
||||
|
||||
Place some task definitions inside `just-task.js` in your root folder (next to package.json):
|
||||
|
@ -22,11 +22,11 @@ task('sayhello', function() {
|
|||
});
|
||||
```
|
||||
|
||||
Then run it!
|
||||
Then run it! It is best to either place `just` inside a npm run script or run it with `npx`:
|
||||
|
||||
```sh
|
||||
$ just sayhello
|
||||
$ just sayhello --name me
|
||||
$ npx just sayhello
|
||||
$ npx just sayhello --name me
|
||||
```
|
||||
|
||||
That's all!
|
||||
|
|
Загрузка…
Ссылка в новой задаче