Skip to content

Conversation

@ifedayoprince
Copy link

This PR introduces two key improvements:

1. Fix: Normalize all generated import paths to POSIX forward-slash format

The Flowcraft compiler previously relied on path.relative() to generate import paths.
On Windows, this produced backslash (\) separators, which resulted in invalid ESM import statements such as:

import { startNode } from '..\src\index'

ESM imports must use POSIX forward slashes (/).
This PR ensures all generated import paths are normalized to path.posix format, making builds consistent across platforms.

2. Fix: Correct syntax + build errors in Getting Started documentation

The examples in the Getting Started page contained minor issues that prevented them from working out-of-the-box.
This PR updates the examples to:

  • Use valid Flowcraft patterns
  • Align Node/Step exports properly
  • Reflect the current compiler behavior
  • Prevent TypeScript errors during build

This ensures the first user experience with Flowcraft is smooth and error-free.
The previous documentation examples failed to compile repeatedly.


Just trying out Flowcraft. Nice project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant