dart - 在新的Dart项目中未看到的Dart模板

标签 dart webstorm

由于推荐,我试图将Webstorm用于我的Dart项目。我已经安装了它,并将其指向Dart sdk和dartium路径。在创建新的Dart项目时,我只会看到Dart Web应用程序和Dart命令行应用程序。没有聚合物模板或任何其他模板。我该怎么做才能看到那些模板。
Dart 发售的相关版本:
Dart 1.11.0(ref 65704b3)DEV(SDK)
Dart 1.11.0(ref 65704b3)(稳定)DARTIUM
编辑1(与Gunter的第一个评论有关)
我删除并尝试重新安装stagehand,但出现以下错误

C:\Users\dart.user\AppData\Roaming\Pub\Cache\global_packages>pub global ac
tivate stagehand
Resolving dependencies...
+ args 0.13.2
+ collection 1.1.1
+ crypto 0.9.0
+ http 0.11.2
+ http_parser 0.0.2+7
+ path 1.3.5
+ source_span 1.1.2
+ stack_trace 1.3.3
+ stagehand 0.2.1
+ string_scanner 0.1.3+1
+ usage 1.0.0+1
Precompiling executables...
Loading source assets...
Failed to precompile stagehand:stagehand:
Unhandled exception:
Uncaught Error: Failure getting http://localhost:49681/packages/crypto/crypto.da
rt: 404 Not Found
Stack Trace:
#0      _asyncLoadError (dart:_builtin:285)
#1      _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
#2      _RootZone.runGuarded (dart:async/zone.dart:1082)
#3      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.
dart:390)
#4      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)

#5      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
#6      _ForwardingStream._handleDone (dart:async/stream_pipe.dart:112)
#7      _handleDone (dart:async/stream_pipe.dart:180)
#8      _RootZone.runGuarded (dart:async/zone.dart:1082)
#9      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.
dart:390)
#10     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)

#11     _DelayedDone.perform (dart:async/stream_impl.dart:614)
#12     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
#13     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart
:671)
#14     _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#15     _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:131)

#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)
#1      _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2      _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:131)
多次尝试只会导致相同的错误。
我做了一个酒吧缓存修复,但是结果是一样的。

最佳答案

Stagehand提供以下模板;聚合物不是其中之一。

$ stagehand
Stagehand will generate the given application type into the current directory.

usage: stagehand <generator-name>
    --[no-]analytics    Opt out of anonymous usage and crash reporting.
-h, --help              Help!
    --version           Display the version for stagehand.
    --author            The author name to use for file headers.
                        (defaults to "<your name>")

Available generators:
  console-full   - A command-line application sample.
  package-simple - A starting point for Dart libraries or applications.
  server-shelf   - A web server built using the shelf package.
  web-angular    - A web app with material design components.
  web-simple     - A web app that uses only core Dart libraries.
  web-stagexl    - A starting point for 2D animation and games.

关于dart - 在新的Dart项目中未看到的Dart模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31089211/

相关文章:

javascript - 为什么 JSLint 在此函数上给出严格违反错误?

flutter - 在Flutter中动态排序ListView

flutter - 在显示和隐藏窗口小部件中的动画时,我在哪里出错?

google-chrome - 调试在 WebStorm 的精简服务器中运行的 Angular 2 应用程序

keyboard-shortcuts - JetBrains IDE - 跳转到关闭 HTML 标签的键盘快捷键

javascript - 在 IntelliJ/WebStorm 中自动格式化 ES6 解构赋值

formatting - 如何在Google Dart编辑器中配置格式设置规则

c# - 在 C# 中加密文件并在 flutter 中解密

flutter - 如何使用整洁的架构和 bloc 库 flutter 来实现 WebSocket?

intellij-idea - JetBrains/IntelliJ IDEA 中的流程