You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,32 @@
4
4
5
5
An open-source toolset for creating and implementing design systems.
6
6
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.
- Twig files can render in React-based Storybook through `renderTwig()`.
14
14
- React components render through Storybook's React/Vite support.
15
15
- Twig and React stories can coexist in the same Storybook instance.
16
16
-`project.emulsify.json` is the source of truth for platform and structure configuration.
17
17
- Platform-specific behavior is controlled by adapters instead of being assumed globally.
18
18
- Node.js 24 or later is required.
19
19
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
+
20
33
## Authoring Models
21
34
22
35
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:
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.
Copy file name to clipboardExpand all lines: docs/migration-4x.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
-
# Migration To 4.x
1
+
# Migration To The Current Release
2
2
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.
4
4
5
5
## Requirements
6
6
7
7
Use Node.js 24 or later. All maintained scripts run `scripts/check-node-version.js` before doing work.
8
8
9
-
## What Changed
9
+
## What Changed From Earlier Versions
10
10
11
11
- Webpack has been replaced with Vite.
12
-
- Storybook now uses `@storybook/react-vite`.
12
+
- Storybook uses `@storybook/react-vite`.
13
13
- Twig rendering remains supported through Emulsify's Twig integration.
14
14
- React components are supported directly through Storybook's React/Vite setup.
15
15
- Twig and React stories can coexist in the same Storybook instance.
@@ -30,7 +30,7 @@ Projects with `variant.structureImplementations` should keep that configuration
30
30
31
31
## Storybook Migration
32
32
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`.
34
34
35
35
```js
36
36
importtemplatefrom'./button.twig';
@@ -63,7 +63,7 @@ Drupal-specific Twig filters are only loaded when the Drupal adapter enables the
63
63
64
64
## Drupal Behavior
65
65
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.
67
67
68
68
Drupal SDC mirroring remains supported for Drupal projects that enable `singleDirectoryComponents`.
Copy file name to clipboardExpand all lines: docs/project-structure.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ components/
31
31
button.scss
32
32
```
33
33
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.
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