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
A monorepo that consolidates all open source projects from the Storyblok organization. This project aims to centralize the development, maintenance, and contribution to Storyblok's ecosystem of SDKs and tools.
A monorepo that consolidates all open source projects from the Storyblok organization. This project aims to centralize the development, maintenance, and contribution to Storyblok's ecosystem of SDKs and tools.
25
+
This monorepo contains all official Storyblok SDKs and integrations:
4
26
5
-
##📦 Available Packages
27
+
### Core SDKs
6
28
7
-
This monorepo contains all official Storyblok SDKs and integrations:
|[@storyblok/js](packages/js)| Core JavaScript SDK for Storyblok |[](https://www.npmjs.com/package/@storyblok/js)[](https://www.npmjs.com/package/@storyblok/js)|
32
+
|[@storyblok/js-client](packages/js-client)| JavaScript client for Storyblok's Content Delivery API |[](https://www.npmjs.com/package/@storyblok/js-client)[](https://www.npmjs.com/package/@storyblok/js-client)|
33
+
|[@storyblok/content-client](packages/content-client)| Content client for Storyblok's Content Delivery API |[](https://www.npmjs.com/package/@storyblok/content-client)[](https://www.npmjs.com/package/@storyblok/content-client)|
8
34
9
-
-`@storyblok/js` - Core JavaScript SDK for Storyblok
10
-
-`@storyblok/react` - React SDK and components
11
-
-`@storyblok/vue` - Vue.js SDK and components
12
-
-`@storyblok/svelte` - Svelte SDK and components
13
-
-`@storyblok/nuxt` - Nuxt.js integration
14
-
-`@storyblok/astro` - Astro integration
15
-
-`@storyblok/richtext` - Rich text renderer
16
-
-`@storyblok/js-client` - Storyblok API client (formerly `storyblok-js-client`)
35
+
### Framework Integrations
17
36
18
-
> **Note**: The `storyblok-js-client` package has been renamed to `@storyblok/js-client` and is now part of our scoped packages.
|[@storyblok/richtext](packages/richtext)| Rich Text Renderer for Storyblok |[](https://www.npmjs.com/package/@storyblok/richtext)[](https://www.npmjs.com/package/@storyblok/richtext)|
23
50
24
-
-**Unified development workflow**: Standardized development practices across all projects
25
-
-**Simplified dependency management**: Easier management of inter-package dependencies
26
-
-**Coordinated releases**: Ability to release multiple packages in tandem
27
-
-**Centralized contribution**: Single location for contributors to engage with all Storyblok projects
28
-
-**Shared infrastructure**: Common CI/CD, testing frameworks, and development tools
51
+
## 🚧 Migration Status
29
52
30
-
The subtree tooling exists specifically to facilitate the migration from individual repositories to this unified structure, while maintaining the history and ability to sync with the original repositories during the transition period.
53
+
This repository represents an ongoing migration from a polyrepo structure to a unified monorepo. While we're actively working on this transition, please note:
31
54
32
-
## 🛠 Development
55
+
- All new development should be done in this repository
56
+
- Existing packages are being migrated gradually
57
+
- Some packages may still be in their original repositories during the transition
58
+
- We're working to ensure a smooth migration with minimal disruption
This repository uses PNPM as its primary package manager, providing efficient dependency management and disk space usage. The workspace is configured in `pnpm-workspace.yaml` and includes all packages in the `packages/` directory.
84
+
85
+
Common PNPM commands:
45
86
```bash
87
+
# Install dependencies
46
88
pnpm install
47
-
```
48
89
49
-
3. Build the monoblok CLI tool:
90
+
# Add a dependency to a specific package
91
+
pnpm add <package> --filter @storyblok/react
50
92
51
-
```bash
52
-
pnpm build:tools
93
+
# Run a script in a specific package
94
+
pnpm --filter @storyblok/react <script>
53
95
```
54
96
55
-
### Development Commands
97
+
### Development with NX
98
+
99
+
While PNPM manages our packages, we use NX to optimize our development workflow. NX provides powerful features for:
100
+
101
+
- Intelligent caching
102
+
- Affected package detection
103
+
- Dependency graph visualization
104
+
- Parallel task execution
105
+
- Project-specific configurations
106
+
107
+
#### Common NX Commands
56
108
57
109
```bash
58
110
# Build all packages
59
-
pnpm nx run-many --target=build --all
111
+
pnpm build
60
112
61
113
# Build a specific package
62
-
pnpm nx build @storyblok/react
114
+
pnpm build @storyblok/react
63
115
64
-
# Run tests
65
-
pnpm nx run-many --target=test --all
116
+
# Run tests for affected packages
117
+
pnpm nx affected:test
66
118
67
-
#Run linting
68
-
pnpm nx run-many --target=lint --all
119
+
#Show dependency graph
120
+
pnpm nx graph
69
121
70
-
# Run type checking
71
-
pnpm nx run-many --target=type-check --all
122
+
# Run commands only on affected packages
123
+
pnpm nx affected --target=build
72
124
```
73
125
74
-
## 🔧 Monoblok CLI
75
-
76
-
The monorepo comes with a CLI tool to manage subtrees during the migration process:
126
+
#### Development Workflows
77
127
78
128
```bash
79
-
#Add all packages from the manifest
80
-
pnpm monoblok add
129
+
#Start development mode for a package
130
+
pnpm dev @storyblok/react
81
131
82
-
#Add a specific package (supports partial matches)
83
-
pnpm monoblok add storyblok-js
132
+
#Run tests in watch mode
133
+
pnpm test:watch @storyblok/react
84
134
85
-
#Pull updates for all packages
86
-
pnpm monoblok pull
135
+
#Lint all packages
136
+
pnpm lint
87
137
88
-
#Pull updates for a specific package
89
-
pnpm monoblok pull storyblok-js
138
+
#Format all packages
139
+
pnpm format
90
140
91
-
# Rebuild a package (remove and re-add)
92
-
pnpm monoblok rebuild storyblok-js
93
-
94
-
# Show help
95
-
pnpm monoblok --help
141
+
# Check types
142
+
pnpm type-check
96
143
```
97
144
98
-
## 📄 Manifest File
99
-
100
-
The `repo-manifest.json` file defines all Storyblok open source projects to be migrated to the monorepo:
145
+
For more advanced NX usage, we recommend exploring:
To migrate a Storyblok project, add it to the manifest and run `pnpm monoblok add <package-name>`.
153
+
For repository administrators, we provide the `monoblock-cli` tool to help manage the monorepo. This tool assists with:
114
154
115
-
## 🚀 Release Process
155
+
- Package migration
156
+
- Dependency management
157
+
- Repository maintenance
158
+
- Release coordination
116
159
117
-
For detailed information about the release process, including versioning, publishing, and distribution tags, please see [RELEASING.md](./RELEASING.md).
160
+
See the [monoblock-cli package](packages/monoblock-cli) for detailed documentation and usage instructions.
118
161
119
-
## 🤝 Contributing
162
+
## 📄 Contributing
120
163
121
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
164
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on:
165
+
- Code style and standards
166
+
- Pull request process
167
+
- Development workflow
168
+
- Testing requirements
122
169
123
170
## 📄 License
124
171
@@ -129,3 +176,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
0 commit comments