Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hydroper committed Mar 8, 2024
1 parent b6b47e2 commit db3ae6e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 29 deletions.
19 changes: 10 additions & 9 deletions spec/1.0/live/overview/jetpm.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ <h1 class="menu-title">Jet Language Specification</h1>
<main>
<h1 id="package-management"><a class="header" href="#package-management">Package management</a></h1>
<p>The language is integrated with JetPM, a package manager that supports a Jet build system, conditional compilation, and workspaces.</p>
<p>A JetPM package belongs to a <em>platform</em>.</p>
<p>Different from packages in other package managers, a JetPM package belongs to a <em>platform</em>, and platforms do not coincide.</p>
<h2 id="build-system"><a class="header" href="#build-system">Build system</a></h2>
<p>The package manifest locates Jet source files, enabling JetPM to build a project through a concise command such as <code>jetpm build</code>, resulting into artifact code.</p>
<p>The package manifest locates Jet source files, enabling JetPM to build a project through a concise command such as <code>jet build</code>, resulting into artifact code.</p>
<p>Here is an example package manifest:</p>
<p><strong>package.json</strong></p>
<pre><code class="language-json">{
Expand All @@ -202,13 +202,14 @@ <h2 id="platforms"><a class="header" href="#platforms">Platforms</a></h2>
}
}
</code></pre>
<p>Supported platforms may be installed through <code>jetpm platform install "uri"</code>. If the URI uses a <code>file:</code> scheme it locates an user platform in the development device.</p>
<p>Platforms use a customized compiler built with the Jet Compiler codebase that is able to compile source files other than the <code>.jet</code> file extension.</p>
<p><em>Platform installation</em>: Supported platforms may be installed through <code>jet platform install "uri"</code>. If the URI uses a <code>file:</code> scheme it locates an user platform in the development device.</p>
<p><em>Compiler</em>: Platforms use a customized compiler built with the Jet Compiler codebase that is able to compile source files other than the <code>.jet</code> file extension.</p>
<p><em>Debugging</em>: The effect of the <code>jet run</code> command is up to the platform.</p>
<h2 id="conditional-compilation"><a class="header" href="#conditional-compilation">Conditional compilation</a></h2>
<p>The JetPM build system receives <em>constants</em> supplied by build commands, which may be used with <a href="conditional-compilation.html">conditional compilation</a>.</p>
<pre><code class="language-plain">jetpm build --define myConstant
jetpm build --define myConstant=10
jetpm build --define q::myConstant=10
<pre><code class="language-plain">jet build --define myConstant
jet build --define myConstant=10
jet build --define q::myConstant=10
</code></pre>
<p>The top-level <code>configuration</code> property of the package manifest specifies the manifest properties in a conditional way. The matching branches are combined and overriden properly in top-down sequence, including the program sources and the package dependencies.</p>
<p>The key of each property in the <code>configuration</code> property is in one of the forms:</p>
Expand Down Expand Up @@ -249,8 +250,8 @@ <h2 id="conditional-compilation"><a class="header" href="#conditional-compilatio
}
</code></pre>
<p>Here are example JetPM commands passing configuration constants:</p>
<pre><code class="language-plain">jetpm build --define someConstant
jetpm build --define air::target=ios
<pre><code class="language-plain">jet build --define someConstant
jet build --define air::target=ios
</code></pre>
<h2 id="scripts"><a class="header" href="#scripts">Scripts</a></h2>
<p>The package manifest allows mapping of executable scripts, as well as their dependencies.</p>
Expand Down
19 changes: 10 additions & 9 deletions spec/1.0/live/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ <h2 id="package-aliasing"><a class="header" href="#package-aliasing">Package ali
<p>In the above program, the <code>y1</code> constant may be shadowed by the <code>y1</code> package alias in certain occasions: when a property defined in the <code>y1</code> package alias matches with the identifier name of a property accessed from the dot operator in the <code>y1</code> base.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="package-management"><a class="header" href="#package-management">Package management</a></h1>
<p>The language is integrated with JetPM, a package manager that supports a Jet build system, conditional compilation, and workspaces.</p>
<p>A JetPM package belongs to a <em>platform</em>.</p>
<p>Different from packages in other package managers, a JetPM package belongs to a <em>platform</em>, and platforms do not coincide.</p>
<h2 id="build-system"><a class="header" href="#build-system">Build system</a></h2>
<p>The package manifest locates Jet source files, enabling JetPM to build a project through a concise command such as <code>jetpm build</code>, resulting into artifact code.</p>
<p>The package manifest locates Jet source files, enabling JetPM to build a project through a concise command such as <code>jet build</code>, resulting into artifact code.</p>
<p>Here is an example package manifest:</p>
<p><strong>package.json</strong></p>
<pre><code class="language-json">{
Expand All @@ -231,13 +231,14 @@ <h2 id="platforms"><a class="header" href="#platforms">Platforms</a></h2>
}
}
</code></pre>
<p>Supported platforms may be installed through <code>jetpm platform install "uri"</code>. If the URI uses a <code>file:</code> scheme it locates an user platform in the development device.</p>
<p>Platforms use a customized compiler built with the Jet Compiler codebase that is able to compile source files other than the <code>.jet</code> file extension.</p>
<p><em>Platform installation</em>: Supported platforms may be installed through <code>jet platform install "uri"</code>. If the URI uses a <code>file:</code> scheme it locates an user platform in the development device.</p>
<p><em>Compiler</em>: Platforms use a customized compiler built with the Jet Compiler codebase that is able to compile source files other than the <code>.jet</code> file extension.</p>
<p><em>Debugging</em>: The effect of the <code>jet run</code> command is up to the platform.</p>
<h2 id="conditional-compilation"><a class="header" href="#conditional-compilation">Conditional compilation</a></h2>
<p>The JetPM build system receives <em>constants</em> supplied by build commands, which may be used with <a href="overview/conditional-compilation.html">conditional compilation</a>.</p>
<pre><code class="language-plain">jetpm build --define myConstant
jetpm build --define myConstant=10
jetpm build --define q::myConstant=10
<pre><code class="language-plain">jet build --define myConstant
jet build --define myConstant=10
jet build --define q::myConstant=10
</code></pre>
<p>The top-level <code>configuration</code> property of the package manifest specifies the manifest properties in a conditional way. The matching branches are combined and overriden properly in top-down sequence, including the program sources and the package dependencies.</p>
<p>The key of each property in the <code>configuration</code> property is in one of the forms:</p>
Expand Down Expand Up @@ -278,8 +279,8 @@ <h2 id="conditional-compilation"><a class="header" href="#conditional-compilatio
}
</code></pre>
<p>Here are example JetPM commands passing configuration constants:</p>
<pre><code class="language-plain">jetpm build --define someConstant
jetpm build --define air::target=ios
<pre><code class="language-plain">jet build --define someConstant
jet build --define air::target=ios
</code></pre>
<h2 id="scripts"><a class="header" href="#scripts">Scripts</a></h2>
<p>The package manifest allows mapping of executable scripts, as well as their dependencies.</p>
Expand Down
2 changes: 1 addition & 1 deletion spec/1.0/live/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion spec/1.0/live/searchindex.json

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions spec/1.0/source/src/overview/jetpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

The language is integrated with JetPM, a package manager that supports a Jet build system, conditional compilation, and workspaces.

A JetPM package belongs to a *platform*.
Different from packages in other package managers, a JetPM package belongs to a *platform*, and platforms do not coincide.

## Build system

The package manifest locates Jet source files, enabling JetPM to build a project through a concise command such as `jetpm build`, resulting into artifact code.
The package manifest locates Jet source files, enabling JetPM to build a project through a concise command such as `jet build`, resulting into artifact code.

Here is an example package manifest:

Expand Down Expand Up @@ -44,18 +44,20 @@ Here is an example of a potential package manifest that uses `http://ns.airsdk.d
}
```

Supported platforms may be installed through `jetpm platform install "uri"`. If the URI uses a `file:` scheme it locates an user platform in the development device.
*Platform installation*: Supported platforms may be installed through `jet platform install "uri"`. If the URI uses a `file:` scheme it locates an user platform in the development device.

Platforms use a customized compiler built with the Jet Compiler codebase that is able to compile source files other than the `.jet` file extension.
*Compiler*: Platforms use a customized compiler built with the Jet Compiler codebase that is able to compile source files other than the `.jet` file extension.

*Debugging*: The effect of the `jet run` command is up to the platform.

## Conditional compilation

The JetPM build system receives *constants* supplied by build commands, which may be used with [conditional compilation](conditional-compilation.md).

```plain
jetpm build --define myConstant
jetpm build --define myConstant=10
jetpm build --define q::myConstant=10
jet build --define myConstant
jet build --define myConstant=10
jet build --define q::myConstant=10
```

The top-level `configuration` property of the package manifest specifies the manifest properties in a conditional way. The matching branches are combined and overriden properly in top-down sequence, including the program sources and the package dependencies.
Expand Down Expand Up @@ -104,8 +106,8 @@ Here is an example package manifest using the `configuration` setting:
Here are example JetPM commands passing configuration constants:

```plain
jetpm build --define someConstant
jetpm build --define air::target=ios
jet build --define someConstant
jet build --define air::target=ios
```

## Scripts
Expand Down

0 comments on commit db3ae6e

Please sign in to comment.