Skip to content

Commit 14934ad

Browse files
authored
fix(dart_frog_gen): windows relative import syntax (#210)
1 parent 041848d commit 14934ad

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/dart_frog_gen.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,25 @@ on:
1717
- "packages/dart_frog_gen/pubspec.yaml"
1818

1919
jobs:
20-
build:
20+
build_ubuntu:
2121
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
2222
with:
2323
concurrency: 1
24+
runs_on: ubuntu-latest
25+
working_directory: packages/dart_frog_gen
26+
27+
build_windows:
28+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
29+
with:
30+
concurrency: 1
31+
runs_on: windows-latest
32+
working_directory: packages/dart_frog_gen
33+
34+
build_macos:
35+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
36+
with:
37+
concurrency: 1
38+
runs_on: macos-latest
2439
working_directory: packages/dart_frog_gen
2540

2641
pana:

packages/dart_frog_gen/lib/src/build_route_configuration.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ List<RouteDirectory> _getRouteDirectories({
7676
.replaceAll(r'\', '/');
7777
middleware = MiddlewareFile(
7878
name: middlewarePath.toAlias(),
79-
path: path.join('..', 'routes', middlewarePath),
79+
path: path.join('..', 'routes', middlewarePath).replaceAll(r'\', '/'),
8080
);
8181
onMiddleware(middleware);
8282
}
@@ -194,7 +194,7 @@ List<RouteFile> _getRouteFiles({
194194
final relativeFilePath = path.join('..', 'routes', filePath);
195195
final route = RouteFile(
196196
name: filePath.toAlias(),
197-
path: relativeFilePath,
197+
path: relativeFilePath.replaceAll(r'\', '/'),
198198
route: fileRoute.toRoute(),
199199
);
200200
onRoute(route);

0 commit comments

Comments
 (0)