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: examples/basic/src/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ md-files: support yaml frontmatter!
6
6
# Basic DOMStack Example
7
7
8
8
This example demonstrates a complete basic website built with DOMStack, showcasing the core features without advanced customization.
9
+
Please inspect the website, the web inspector (source and network tab), the src code in the example folder as well as the ouput files in the public folder to get an idea of how everything works.
CSS modules are NOT supported in Node.js natively, so you need to import a loader to support them, or only reference them in client bundles.
11
+
5
12
## What Are CSS Modules?
6
13
7
14
CSS modules are CSS files where class names and animation names are scoped locally by default. This prevents style leakage and naming collisions in your application.
Copy file name to clipboardExpand all lines: examples/default-layout/src/README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,3 +81,21 @@ While the default layout is convenient for getting started, you should create cu
81
81
- Special metadata or analytics integrations
82
82
83
83
For custom layouts, check the other examples in the DOMStack repository, particularly the `basic` example.
84
+
85
+
## Ejecting from the Default Layout
86
+
87
+
If you want to customize the default layout, you can use the `--eject` flag to extract the built-in layout into your project:
88
+
89
+
```bash
90
+
npx domstack --eject
91
+
```
92
+
93
+
This command will:
94
+
95
+
1. Create a `root.layout.js` file in your project's `src` directory
96
+
2. Copy the contents of the default layout into this new file
97
+
3. Allow you to modify the layout to suit your specific needs
98
+
99
+
After ejecting, you can edit the generated `root.layout.js` file like any other custom layout. This gives you a solid foundation to build upon rather than starting from scratch.
100
+
101
+
> **Note:** Once you eject, DOMStack will use your custom layout file instead of the built-in default. If you want to revert to the original default layout, you'll need to delete your custom `root.layout.js` file.
0 commit comments