Skip to content

Commit 09540bb

Browse files
author
Callin Mullaney
committed
docs: refine documentation tone
1 parent c12271a commit 09540bb

8 files changed

Lines changed: 65 additions & 19 deletions

File tree

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,32 @@
44

55
An open-source toolset for creating and implementing design systems.
66

7-
**Emulsify Core** provides shared [Vite](https://vite.dev/) build configuration and a [Storybook](https://storybook.js.org/) component library setup for component-driven development. In 4.x, Twig-based components and React components are both supported authoring models. A project can be Twig-first, React-first, or intentionally mixed.
7+
**Emulsify Core** provides shared [Vite](https://vite.dev/) build configuration and a [Storybook](https://storybook.js.org/) component library setup for component-driven development. Twig-based components and React components are both supported authoring models. A project can be Twig-first, React-first, or intentionally mixed.
88

9-
## 4.x At A Glance
9+
## How Emulsify Core Works
1010

11-
- Webpack has been replaced with Vite.
12-
- Storybook uses `@storybook/react-vite`.
11+
- Vite builds project JavaScript, Sass/CSS, Twig templates, component metadata, and static component assets.
12+
- Storybook uses the React/Vite framework.
1313
- Twig files can render in React-based Storybook through `renderTwig()`.
1414
- React components render through Storybook's React/Vite support.
1515
- Twig and React stories can coexist in the same Storybook instance.
1616
- `project.emulsify.json` is the source of truth for platform and structure configuration.
1717
- Platform-specific behavior is controlled by adapters instead of being assumed globally.
1818
- Node.js 24 or later is required.
1919

20+
## Project Evolution
21+
22+
Emulsify Core has grown through each major release while keeping the same practical goal: make component-library tooling easier to share across real projects.
23+
24+
- `1.x` established Emulsify Core as a reusable package for Storybook, Webpack, linting, a11y checks, project overrides, and asset handling.
25+
- `2.x` expanded component structure support, improved Drupal SDC compatibility, upgraded Storybook, and made more project files configurable from consuming projects.
26+
- `3.x` modernized the runtime around ESM and Node 24, continued Storybook and dependency upgrades, improved component asset copying, and strengthened compatibility for existing Drupal-oriented builds.
27+
- The current release moves the build system to Vite, runs Storybook on React/Vite, supports Twig and React stories side by side, and normalizes platform and project-structure behavior through `project.emulsify.json`.
28+
29+
The latest version is the next evolution of that work: faster builds, clearer public APIs, less global Drupal assumption, and a broader foundation for CMS themes, standalone UI libraries, and mixed component systems.
30+
31+
See [Version Evolution](docs/version-evolution.md) for more release history.
32+
2033
## Authoring Models
2134

2235
Twig and React are equally valid ways to build component libraries with Emulsify Core. The right authoring model depends on the consuming project:
@@ -56,21 +69,22 @@ Common project scripts call the shared Emulsify Core Vite and Storybook config:
5669

5770
## Documentation
5871

59-
The full 4.x documentation is split by task:
72+
The documentation is split by task:
6073

6174
| Topic | Use This When |
6275
| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
76+
| [Version Evolution](docs/version-evolution.md) | Understanding how Emulsify Core has evolved across major releases. |
6377
| [Component Authoring](docs/component-authoring.md) | Choosing Twig, React, or mixed Storybook authoring and comparing component examples. |
6478
| [Storybook](docs/storybook.md) | Rendering Twig stories, using `renderTwig()`, understanding Twig runtime helpers, and mixing Twig with React stories. |
6579
| [Project Structure And Output](docs/project-structure.md) | Configuring `src/components`, root `./components`, `variant.structureImplementations`, and expected output paths. |
6680
| [Platform Adapters](docs/platform-adapters.md) | Understanding `generic`, `drupal`, platform resolution order, and Drupal SDC behavior. |
6781
| [Extension Points](docs/extension-points.md) | Adding Vite plugins, Tailwind CSS, Storybook preview overrides, and other framework tooling. |
6882
| [Native Twig Extensions](docs/native-twig-extensions.md) | Using `bem()`, `add_attributes()`, and `switch/case/default/endswitch` in Twig.js. |
69-
| [Migration To 4.x](docs/migration-4x.md) | Upgrading from 3.x, preserving existing structures, and adopting Vite/React Storybook. |
83+
| [Migration](docs/migration-4x.md) | Upgrading from earlier versions while preserving existing structures. |
7084

7185
## Supported Project Shapes
7286

73-
Current release-readiness coverage validates:
87+
Release-readiness coverage validates:
7488

7589
- Drupal SDC projects using `src/components`.
7690
- Generic Twig projects using `src/components`.
@@ -82,7 +96,7 @@ Craft CMS and WordPress + Timber are documented as Twig-based project use cases
8296

8397
## Public Imports
8498

85-
Emulsify Core 4.x exposes stable public package paths:
99+
Emulsify Core exposes stable public package paths:
86100

87101
```js
88102
import { renderTwig } from '@emulsify/core/storybook';

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ These docs expand on the short project README and are organized by the task a pr
44

55
| Topic | Use This When |
66
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
7+
| [Version Evolution](version-evolution.md) | Understanding how Emulsify Core has evolved across major releases. |
78
| [Component Authoring](component-authoring.md) | Choosing Twig, React, or mixed Storybook authoring and comparing component examples. |
89
| [Storybook](storybook.md) | Rendering Twig stories, using `renderTwig()`, understanding Twig runtime helpers, and mixing Twig with React stories. |
910
| [Project Structure And Output](project-structure.md) | Configuring `src/components`, root `./components`, `variant.structureImplementations`, and expected output paths. |
1011
| [Platform Adapters](platform-adapters.md) | Understanding `generic`, `drupal`, platform resolution order, and Drupal SDC behavior. |
1112
| [Extension Points](extension-points.md) | Adding Vite plugins, Tailwind CSS, Storybook preview overrides, and other framework tooling. |
1213
| [Native Twig Extensions](native-twig-extensions.md) | Using `bem()`, `add_attributes()`, and `switch/case/default/endswitch` in Twig.js. |
13-
| [Migration To 4.x](migration-4x.md) | Upgrading from 3.x, preserving existing structures, and adopting Vite/React Storybook. |
14+
| [Migration](migration-4x.md) | Upgrading from earlier versions while preserving existing structures. |

docs/component-authoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Storybook's Twig runtime supports Emulsify's native Twig helpers plus `include()
3434

3535
## React Component Libraries
3636

37-
React components render through Storybook's React/Vite support. Storybook discovers React stories from the same normalized story roots as Twig stories. The shared Storybook globs include `*.stories.js`, `*.stories.jsx`, `*.stories.ts`, and `*.stories.tsx`; current release fixture coverage validates JavaScript/JSX stories.
37+
React components render through Storybook's React/Vite support. Storybook discovers React stories from the same normalized story roots as Twig stories. The shared Storybook globs include `*.stories.js`, `*.stories.jsx`, `*.stories.ts`, and `*.stories.tsx`; fixture coverage validates JavaScript/JSX stories.
3838

3939
```jsx
4040
import { Button } from './Button';

docs/extension-points.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Use preview head for markup needed inside the story iframe, such as fonts, meta
122122

123123
## Public Imports
124124

125-
Emulsify Core 4.x exposes stable public package paths:
125+
Emulsify Core exposes stable public package paths:
126126

127127
```js
128128
import { renderTwig } from '@emulsify/core/storybook';

docs/migration-4x.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Migration To 4.x
1+
# Migration To The Current Release
22

3-
Emulsify Core 4.x moves the build and component library stack from Webpack-era assumptions to Vite and React/Vite Storybook while preserving existing component structures.
3+
Emulsify Core now runs on Vite and React/Vite Storybook while preserving existing component structures. This guide is for projects upgrading from earlier Webpack-based versions.
44

55
## Requirements
66

77
Use Node.js 24 or later. All maintained scripts run `scripts/check-node-version.js` before doing work.
88

9-
## What Changed
9+
## What Changed From Earlier Versions
1010

1111
- Webpack has been replaced with Vite.
12-
- Storybook now uses `@storybook/react-vite`.
12+
- Storybook uses `@storybook/react-vite`.
1313
- Twig rendering remains supported through Emulsify's Twig integration.
1414
- React components are supported directly through Storybook's React/Vite setup.
1515
- Twig and React stories can coexist in the same Storybook instance.
@@ -30,7 +30,7 @@ Projects with `variant.structureImplementations` should keep that configuration
3030

3131
## Storybook Migration
3232

33-
Storybook now runs on React/Vite. Twig stories still work, but imported Twig templates should be rendered with `renderTwig()` from `@emulsify/core/storybook`.
33+
Storybook runs on React/Vite. Twig stories still work, but imported Twig templates should be rendered with `renderTwig()` from `@emulsify/core/storybook`.
3434

3535
```js
3636
import template from './button.twig';
@@ -63,7 +63,7 @@ Drupal-specific Twig filters are only loaded when the Drupal adapter enables the
6363

6464
## Drupal Behavior
6565

66-
Drupal-specific Storybook behavior now comes from the Drupal platform adapter. Generic and unknown platforms do not create or require a Drupal global by default.
66+
Drupal-specific Storybook behavior comes from the Drupal platform adapter. Generic and unknown platforms do not create or require a Drupal global by default.
6767

6868
Drupal SDC mirroring remains supported for Drupal projects that enable `singleDirectoryComponents`.
6969

docs/project-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ components/
3131
button.scss
3232
```
3333

34-
Projects using this structure do not need to create `src/` just to upgrade to 4.x. Generic builds emit into `dist/`; Drupal SDC mirroring happens only when the Drupal adapter enables it.
34+
Projects using this structure do not need to create `src/` just to use the current build system. Generic builds emit into `dist/`; Drupal SDC mirroring happens only when the Drupal adapter enables it.
3535

3636
### `variant.structureImplementations`
3737

docs/storybook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Storybook
22

3-
Emulsify Core 4.x uses `@storybook/react-vite`. React components render directly through Storybook's React framework, and Twig templates render through Emulsify's Twig story helper.
3+
Emulsify Core uses `@storybook/react-vite`. React components render directly through Storybook's React framework, and Twig templates render through Emulsify's Twig story helper.
44

55
## Twig Stories
66

docs/version-evolution.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Version Evolution
2+
3+
Emulsify Core has always focused on one job: package the build, Storybook, linting, and component-library conventions that Emulsify projects need, while still giving individual projects room to extend those conventions.
4+
5+
The current release keeps that goal and moves the implementation forward. It replaces the older Webpack-centered stack with Vite, uses React/Vite Storybook, supports Twig and React stories in the same library, and uses `project.emulsify.json` as the source of truth for platform and structure decisions.
6+
7+
## 1.x: Shared Tooling Foundation
8+
9+
The first major version established Emulsify Core as a reusable package instead of a set of copied project files. It bundled Storybook, Webpack, linting, a11y checks, Sass processing, Twig-related build support, asset handling, and project override hooks.
10+
11+
That release made it practical for themes and standalone projects to consume shared Emulsify tooling from npm while still keeping project-specific configuration in the consuming project.
12+
13+
## 2.x: Project Structure And Drupal SDC Support
14+
15+
The second major version expanded how Emulsify Core handled project structure. It added better support for older component layouts, multi-level component directories, global and foundational asset processing, Storybook static directories, and Drupal-oriented SDC workflows.
16+
17+
This version also continued dependency and Storybook upgrades while making more behavior configurable through project-level files. The important compatibility lesson from this era remains true: projects should not have to move working component directories just to keep using Emulsify Core.
18+
19+
## 3.x: Runtime Modernization
20+
21+
The third major version moved the package into a more modern JavaScript runtime model. It adopted ESM, raised the runtime floor to Node 24, kept dependencies current, refined PostCSS and Sass handling, improved component asset copying, and continued to preserve existing Drupal SDC behavior.
22+
23+
It also set up the architectural runway for the current build model by cleaning up module scope, Storybook behavior, asset resolution, and package compatibility work.
24+
25+
## Current Release: Vite, React/Vite Storybook, And Platform Adapters
26+
27+
The current release is the next evolution of Emulsify Core. Vite replaces Webpack as the build engine. Storybook runs on the React/Vite framework. Twig templates render through Emulsify's Storybook helper, and React components render through normal Storybook React patterns.
28+
29+
The project model is also more explicit. `project.emulsify.json` drives platform and structure configuration. The normalized structure model supports `src/components`, root `./components`, and custom `variant.structureImplementations`. Platform adapters own platform-specific behavior such as Drupal behavior attachment, Drupal Twig filters, and Drupal SDC output mirroring.
30+
31+
That combination keeps existing Drupal and Twig-heavy projects viable while making Emulsify Core a better fit for generic Twig libraries, standalone React libraries, and mixed design systems. It is not a break from the project history; it is the same shared-tooling idea updated for the way modern component libraries are built.

0 commit comments

Comments
 (0)