Skip to content

Commit

Permalink
fix: 0.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten committed May 31, 2021
1 parent bfab1ac commit b61a9a2
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## [0.8.5] - 31-05-2021

- fix: upgrade of deno-rollup brought in a breaking change which normalized absolute ids to relative - see [rollup release notes](https://github.com/rollup/rollup/releases/tag/v2.44.0). Required to add `makeAbsoluteExternalsRelative: false` and fix some import parsing to maintain desired behaviour and id format within the luath module graph.

## [0.8.4] - 31-05-2021

- chore: upgrade deps
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Luath can be used either through a command line interface (CLI):

```bash
# Install Luath
deno install -fqA --unstable --no-check https://deno.land/x/luath@0.8.4/luath.ts
deno install -fqA --unstable --no-check https://deno.land/x/luath@0.8.5/luath.ts

# Change directory to example
cd ./examples/react
Expand All @@ -62,13 +62,13 @@ luath run
Or through it's JavaScript API:

```ts
import { server } from "https://deno.land/x/luath@0.8.4/mod.ts";
import { server } from "https://deno.land/x/luath@0.8.5/mod.ts";

await server({ root: "./examples/vanilla" });
```

```ts
import { build } from "https://deno.land/x/luath@0.8.4/mod.ts";
import { build } from "https://deno.land/x/luath@0.8.5/mod.ts";

await build({ root: "./examples/vanilla" });
```
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/luath.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
current_version: "0.8.4"
current_version: "0.8.5"
4 changes: 2 additions & 2 deletions docs/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ lang: en
<h3><code>server: (options?: LuathOptions) => Promise</code></h3>
<p>Create a Luath server with custom options. Resolves to an <a href="https://github.com/asos-craigmorten/opine"><code>opine</code></a> server.</p>
<p>For example:</p>
<pre><code>import { server } from "https://deno.land/x/luath@0.8.4/mod.ts";
<pre><code>import { server } from "https://deno.land/x/luath@0.8.5/mod.ts";
<br />import { plugins } from "./plugins.ts";
<br />await server({ root: Deno.cwd(), server: { port: 4000 }, plugins });</code></pre>
<h3><code>build: (options?: LuathOptions) => Promise</code></h3>
<p>Builds the production assets.</p>
<p>For example:</p>
<pre><code>import { build } from "https://deno.land/x/luath@0.8.4/mod.ts";
<pre><code>import { build } from "https://deno.land/x/luath@0.8.5/mod.ts";
<br />import { plugins } from "./plugins.ts";
<br />await build({ root: Deno.cwd(), plugins });</code></pre>
</section>
Expand Down
4 changes: 2 additions & 2 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lang: en
<section class="subsection">
<h2 id="running-your-first-luath-project">Running Your First Luath Project</h2>
<p>Install the Luath CLI using <a href="https://deno.land/">Deno</a>:</p>
<pre><code>$ deno install -fqA --unstable https://deno.land/x/luath@0.8.4/luath.ts</code></pre>
<pre><code>$ deno install -fqA --unstable https://deno.land/x/luath@0.8.5/luath.ts</code></pre>
<p>Then follow any prompts from the Deno command. For example, you may need to add the Deno bin directory to your path:</p>
<pre><code>$ export PATH="$HOME/.deno/bin:$PATH"</code></pre>
<p>You are now set to use Luath. Let's try it out with one of the Luath repo examples:</p>
Expand All @@ -39,7 +39,7 @@ lang: en
<pre><code>$ luath --help

Usage: luath [root:string]
Version: v0.8.4
Version: v0.8.5

Description:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lang: en
<img src="images/favicon.png" alt="Deno zooming through the lighting storm that is front-end development" class="logo" />
<div class="title"><a href="/luath/" class="luath">Luath</a><span><a href="https://github.com/cmorten/luath/blob/main/.github/CHANGELOG.md" class="version">{{ site.data.luath.current_version }}</a></span></div>
<p class="description">Fast front-end development tooling in <a href="https://deno.land/">Deno</a>.</p>
<pre><code>$ deno install -fqA --unstable https://deno.land/x/luath@0.8.4/luath.ts</code></pre>
<pre><code>$ deno install -fqA --unstable https://deno.land/x/luath@0.8.5/luath.ts</code></pre>
<div><a href="/luath/guide" class="primary get-started">Get Started</a></div>
</section>
</main>
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To run an example:
2. Install the Luath CLI:

```bash
deno install -fqA --unstable --no-check https://deno.land/x/luath@0.8.4/luath.ts
deno install -fqA --unstable --no-check https://deno.land/x/luath@0.8.5/luath.ts
```

3. Then run the desired example by navigating to the directory and running the appropriate Luath `serve` command. E.g.
Expand Down
4 changes: 4 additions & 0 deletions examples/react/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
pointer-events: none;
}

.hello {
font-size: 24px;
}

.header {
background-color: #111;
min-height: 100vh;
Expand Down
2 changes: 1 addition & 1 deletion examples/react/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function App() {
<div className={styles.app}>
<header className={styles.header}>
<img src={logo} className={styles.logo} alt="React logo" />
<p>Hello Luath!</p>
<p className={styles.hello}>Hello Luath!</p>
<p>
<button onClick={() => setCount((count) => count + 1)}>
Click count is: {count}
Expand Down
4 changes: 3 additions & 1 deletion examples/react/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ body {

body,
button {
font-size: 24px;
font-size: 16px;
font-family: "Helvetica Nueue", "Lucida Grande", Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
Expand Down
4 changes: 2 additions & 2 deletions src/middlewares/transform/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export async function bundle(

const build = await rollup({
input: filename,
cache: false,
plugins: [
// TODO: need concept of pre / post for custom plugins
...plugins,
Expand All @@ -104,6 +103,7 @@ export async function bundle(
external: (source) => !isBareImportSpecifier(source),
onwarn() {},
treeshake: false,
makeAbsoluteExternalsRelative: false,
});

const { output } = await build.generate({
Expand Down Expand Up @@ -139,7 +139,7 @@ export async function bundle(
)
.filter((path) => !isLuathImport(path) && !isHttpUrl(path))
.forEach((path) => {
const importedId = pathToId(path, rootDir);
const importedId = pathToId(resolve(`.${dirname(id)}`, path), rootDir);
const importedMod = moduleGraph.ensure(importedId);

importedMod.dependents.add(entryId);
Expand Down
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "0.8.4";
export const version = "0.8.5";

0 comments on commit b61a9a2

Please sign in to comment.