Skip to content

Commit

Permalink
📕 docs(none): 6.4.4 (#1720)
Browse files Browse the repository at this point in the history
- release notes for 6.4.4
- new tag page component
- update `/blog/*` -> `/release/*` (included in redirects)
- add documentation on configuring server in multi-instance config (see #1713)

refers:

- #1713

## Type of change

**PATCH: backwards compatible change**



This PR includes breaking changes to the following core packages:

- none

This PR includes breaking changes to the follow extensions:

- none

## Dependencies

### Adds

- none

### Removes

- none
  • Loading branch information
kellymears committed Sep 28, 2022
1 parent 558f635 commit e587f16
Show file tree
Hide file tree
Showing 32 changed files with 210 additions and 33 deletions.
5 changes: 3 additions & 2 deletions sources/@repo/docs/_redirects
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
http://budjs.netlify.app/* https://bud.js.org/:splat 301!
https://budjs.netlify.app/* https://bud.js.org/:splat 301!
https://bud.js.org/releases https://bud.js.org/blog/tags/release 301!
https://bud.js.org/releases/* https://bud.js.org/blog/:splat 301!
https://bud.js.org/blog/tags/release https://bud.js.org/releases 301!
https://bud.js.org/blog/* https://bud.js.org/releases/:splat 301!
https://bud.js.org/guides/general-use/multi-compiler https://bud.js.org/guides/general-use/multi-instance 301!
14 changes: 11 additions & 3 deletions sources/@repo/docs/config/docusaurus.theme.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const footer = {
title: `More`,
items: [
{
label: `Blog`,
to: `/blog`,
label: `Releases`,
to: `/releases`,
},
{
label: `GitHub`,
Expand Down Expand Up @@ -131,7 +131,15 @@ const navbar = {
label: `Extensions`,
docsPluginId: `extensions`,
},
{to: `/blog`, label: `Blog`, position: `right`},
{
to: `/releases`,
label: `Releases`,
position: `left`,
items: [
{to: `/releases/tags/6-4`, label: `6.4`},
{to: `/releases/tags/6-3`, label: `6.3`},
],
},
{
href: `/dev`,
label: `Dev`,
Expand Down
6 changes: 3 additions & 3 deletions sources/@repo/docs/content/docs/bud.make.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'

Create a new, configurable instance of Bud.

For more context on how this might be useful check out [the guide on multi-compiler configurations](/guides/general-use/multi-compiler).
For more context on how this might be useful check out [the guide on multi-instance configurations](/guides/general-use/multi-instance).

## Usage

Expand All @@ -35,7 +35,7 @@ export default async bud => {
bud.make(
{
name: 'compiler-b',
basedir: bud.path('./compiler-a'),
basedir: bud.path('./compiler-b'),
},
async child => {
child.entry('app', 'app.js')
Expand All @@ -50,4 +50,4 @@ Related:

Guides:

- [multi-compiler guide](/guides/general-use/multi-compiler)
- [multi-instance guide](/guides/general-use/multi-instance)
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Running multiple compilers
title: Running multiple instances
description: It is possible to configure more than one Webpack compiler from a single bud config.
sidebar_label: Multi-compiler mode
---

:::info Experimental
Expand All @@ -18,11 +17,19 @@ different build requirements for different application components — it is

## Creating child instances

To specify a new child instance, we can use [bud.make](/docs/bud.make). It is a function that accepts two parameters:
To create a new child instance, we can use [bud.make](/docs/bud.make).

1. A context (at minimum, an object with a unique `label` prop), and;
It is a function that accepts two parameters:

1. A context (at minimum, a unique string used to identify the instance), and;
2. an optional callback used to configure the instance.

```ts title='bud.config.js'
export default async bud => {
await bud.make('theme', async theme => theme.entry('theme'))
}
```

In this example we're creating two instances: one for `theme` code and another for `plugin` code.

```ts title='bud.config.mjs'
Expand Down Expand Up @@ -99,3 +106,43 @@ export default async bud => {
})
}
```

## Configuring the development server

Any configuration of the development server should be done in the parent context.

This includes:

- [bud.serve](/docs/bud.serve)
- [bud.proxy](/docs/bud.proxy)
- [bud.watch](/docs/bud.watch)

```ts title='bud.config.mjs'
export default async bud => {
/**
* Configure dev server in the parent context
*/
bud
.watch([`resources/views/**/*`, `app/**/*`])
.proxy(`https://sage.test`)
.serve(`http://0.0.0.0:3000`)

await bud.make(`app`, async app => app)
await bud.make(`editor`, async editor => editor)
}
```

Child instances do not feature their own development server. This is incorrect:

```ts title='bud.config.mjs'
export default async bud => {
await bud.make(`app`, async app => {
app
.watch([`resources/views/**/*`, `app/**/*`])
.proxy(`https://sage.test`)
.serve(`http://0.0.0.0:3000`)
})

await bud.make(`editor`, async editor => editor)
}
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.3]
---

import CodeBlock from '@theme/CodeBlock'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.3]
---

import CodeBlock from '@theme/CodeBlock'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.3]
---

Important fixes for roots/sage projects using acorn@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.3]
---

<!--truncate-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.3]
---

<!--truncate-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
slug: '6.3.5'
title: 'Release: 6.3.5'
description: 'Release notes for bud.js 6.3.5'
date: 2022-07-25
date: 2022-07-26
author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.3]
---

<!--truncate-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
slug: '6.4.0'
title: 'Release: 6.4.0'
description: 'Release notes for bud.js 6.4.0'
date: 2022-08-15
slug: 6.4.0
title: 6.4.0
description: '6.4 replaces `webpack-hot-middleware`, adds a slew of new cli features, and fixes more than a few bugs along the way.'
date: 2022-09-15
author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.4]
---

6.4 replaces `webpack-hot-middleware`, adds a slew of new cli features, and fixes more than a few bugs along the way.

<!--truncate-->

## Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
slug: '6.4.2'
title: 'Release: 6.4.2'
title: '6.4.2'
description: 'Release notes for bud.js 6.4.2'
date: 2022-08-23
date: 2022-09-23
author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.4]
---

A bugfix release for bud 6.4.

<!--truncate-->

## 👉🏼 known issue: [@roots/sage] errors logged when not using tailwindcss
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
slug: '6.4.3'
title: 'Release: 6.4.3'
title: '6.4.3'
description: 'Release notes for bud.js 6.4.3'
date: 2022-08-24
date: 2022-09-24
author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release]
tags: [release, 6.4]
---

A bugfix release for bud 6.4.

<!--truncate-->

## 🩹 fix: [@roots/sage](https://bud.js.org/extensions/sage) errors logged when not using tailwindcss
Expand Down
27 changes: 27 additions & 0 deletions sources/@repo/docs/content/releases/6.4.4.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
slug: '6.4.4'
title: '6.4.4'
description: 'Release notes for bud.js 6.4.4'
date: 2022-09-27
author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release, 6.4]
---

A bugfix release for bud 6.4. Mainly focused on multi-instance configurations.

<!--truncate-->

## 🩹 fix: [@roots/bud-postcss](https://bud.js.org/extensions/bud-postcss) not applied in multi-instance configurations

Fixes an issue where [@roots/bud-postcss](https://bud.js.org/extensions/bud-postcss) was not applied to child compilations. ([#1702](https://github.com/roots/bud/issues/1702)).

## 📕 docs: improve multi-instance documentation

Added documentation for configuring development server in a multi-instance setup to the [multi-instance guide](https://bud.js.org/guides/general-use/multi-instance). ([#1713](https://github.com/roots/bud/issues/1713))

## ℹ️ Release information

For more information [review the diff to see what's changed](https://github.com/roots/bud/compare/v6.4.3...v6.4.4).
2 changes: 1 addition & 1 deletion sources/@repo/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./config/index.cjs')
module.exports = require(`./config/index.cjs`)
2 changes: 2 additions & 0 deletions sources/@repo/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
"webpack": "5.74.0"
},
"dependencies": {
"@docusaurus/theme-classic": "2.1.0",
"@docusaurus/theme-common": "2.1.0",
"axios": "0.27.2",
"clsx": "1.2.1",
"docusaurus-lunr-search": "2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/docs/sidebars/guides.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
`general-use/alternative-config-syntax`,
`general-use/config-layers`,
`general-use/extensions`,
`general-use/multi-compiler`,
`general-use/multi-instance`,
`general-use/node-api`,
`general-use/esmodules`,
`general-use/remote-sources`,
Expand Down
83 changes: 83 additions & 0 deletions sources/@repo/docs/src/theme/BlogTagsPostsPage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import Link from '@docusaurus/Link'
import {
HtmlClassNameProvider,
PageMetadata,
ThemeClassNames,
usePluralForm,
} from '@docusaurus/theme-common'
import {translate} from '@docusaurus/Translate'
import {Hero} from '@site/src/components/Hero'
import BlogPostItems from '@theme/BlogPostItems'
import Layout from '@theme/Layout'
import SearchMetadata from '@theme/SearchMetadata'
import clsx from 'clsx'
import React from 'react'

// Very simple pluralization: probably good enough for now
function useBlogPostsPlural() {
const {selectMessage} = usePluralForm()
return count =>
selectMessage(
count,
translate(
{
id: `theme.blog.post.plurals`,
description: `Pluralized label for "{count} posts". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)`,
message: `One post|{count} posts`,
},
{count},
),
)
}
function useBlogTagsPostsPageTitle(tag) {
const blogPostsPlural = useBlogPostsPlural()
return translate(
{
id: `theme.blog.tagTitle`,
description: `The title of the page for a blog tag`,
message: `{nPosts} tagged with "{tagName}"`,
},
{nPosts: blogPostsPlural(tag.count), tagName: tag.label},
)
}
function BlogTagsPostsPageMetadata({tag}) {
const title = useBlogTagsPostsPageTitle(tag)
return (
<>
<PageMetadata title={title} />
<SearchMetadata tag="blog_tags_posts" />
</>
)
}
function BlogTagsPostsPageContent({tag, items, sidebar, listMetadata}) {
const title = useBlogTagsPostsPageTitle(tag)

return (
<Layout>
<header className="margin-bottom--xl">
{tag.label?.match(/\d*.\d*/) ? (
<Hero title={`bud ${tag.label}`} subtitle="Release notes" />
) : (
<h1>{title}</h1>
)}
</header>

<div className="container">
<BlogPostItems items={items} />
</div>
</Layout>
)
}
export default function BlogTagsPostsPage(props) {
return (
<HtmlClassNameProvider
className={clsx(
ThemeClassNames.wrapper.blogPages,
ThemeClassNames.page.blogTagPostListPage,
)}
>
<BlogTagsPostsPageMetadata {...props} />
<BlogTagsPostsPageContent {...props} />
</HtmlClassNameProvider>
)
}
Loading

0 comments on commit e587f16

Please sign in to comment.