Skip to content

Commit

Permalink
fix: Fixed a bug that caused the path to be incorrect when creating a…
Browse files Browse the repository at this point in the history
… document at the first level.
  • Loading branch information
mathrunet committed Jul 26, 2023
1 parent 228372f commit 83e558d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
7 changes: 5 additions & 2 deletions packages/katana_cli/lib/action/app/speech_to_text.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// Project imports:
// Dart imports:
import 'dart:io';

import 'package:katana_cli/katana_cli.dart';
// Package imports:
import 'package:xml/xml.dart';

// Project imports:
import 'package:katana_cli/katana_cli.dart';

/// Add a module for using Speech-to-Text.
///
/// Speech-to-Textを利用するためのモジュールを追加します。
Expand Down
7 changes: 5 additions & 2 deletions packages/katana_cli/lib/action/app/text_to_speech.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// Project imports:
// Dart imports:
import 'dart:io';

import 'package:katana_cli/katana_cli.dart';
// Package imports:
import 'package:xml/xml.dart';

// Project imports:
import 'package:katana_cli/katana_cli.dart';

/// Add a module to use Text-to-Speech.
///
/// Text-to-Speechを利用するためのモジュールを追加します。
Expand Down
6 changes: 5 additions & 1 deletion packages/katana_cli/lib/command/code/document.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ part '$baseName.freezed.dart';
String body(String path, String baseName, String className) {
final paths = path.split("/");
if (paths.length.isOdd) {
path = paths.sublist(0, paths.length - 1).join("/");
if (paths.length <= 1) {
path = (paths..insert(0, "app")).join("/");
} else {
path = paths.sublist(0, paths.length - 1).join("/");
}
}
return """
/// Alias for ModelRef<${className}Model>.
Expand Down

0 comments on commit 83e558d

Please sign in to comment.