mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Use HTTPS package download in tutorial
This commit is contained in:
parent
4513257289
commit
1b29a60fe5
1 changed files with 4 additions and 12 deletions
|
@ -135,24 +135,16 @@ to use them for more than that.</p>
|
|||
<p>Let's move out of the REPL and create our first Roc application!</p>
|
||||
<p>Create a new file named <code>hello.roc</code> and put this inside it:</p>
|
||||
<samp><span class="kw">app</span> <span class="str">"hello"</span>
|
||||
<span class="kw">packages</span> { pf: <span class="str">"examples/cli/cli-platform/main.roc"</span> }
|
||||
<span class="kw">packages</span> { pf: <span class="str">"https://roc-lang.org/tutorial/cli-platform/1.0.0"</span> }
|
||||
<span class="kw">imports</span> [pf.Stdout, pf.Program]
|
||||
<span class="kw">provides</span> [main] <span class="kw">to</span> pf
|
||||
|
||||
main =
|
||||
main <span class="kw">=</span>
|
||||
Stdout.line <span class="str">"I'm a Roc application!"</span>
|
||||
|> Program.quick
|
||||
<span class="kw">|></span> Program.quick
|
||||
</code></samp>
|
||||
<blockquote>
|
||||
<p><strong>NOTE:</strong> This assumes you've put <code>hello.roc</code> in the root directory of the Roc
|
||||
source code. If you'd like to put it somewhere else, you'll need to replace
|
||||
<code class="str">"examples/cli/cli-platform/main.roc"</code> with the path to the
|
||||
<code>examples/cli/cli-platform/main.roc</code> file in that source code. In a future release of Roc,
|
||||
having the Roc source code downloaded will no longer be necessary to access <code>cli-platform</code>!</p>
|
||||
</blockquote>
|
||||
<p>Try running this with:</p>
|
||||
<pre><code class="lang-sh"><span class="hljs-variable">$ </span>roc Hello.roc
|
||||
</code></pre>
|
||||
<samp>roc Hello.roc</samp>
|
||||
<p>You should see this:</p>
|
||||
<pre><code class="lang-sh">I<span class="hljs-comment">'m a Roc application!</span>
|
||||
</code></pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue