3

I can't figure out how to run the build.dart (or any other dart) file in WebStorm.

The only option to run dart files seems to be DartUnit, but I think that is only for running tests.

I need to run the build.dart to create the WebUI Template output files.

It would also be great to be able to automatically run build.dart whenever a file changes (like the Dart Editor does).

Thank you

Christine
  • 3,014
  • 2
  • 24
  • 34
  • http://www.youtube.com/watch?v=WmZfC2S6pg4 – chameleon95 Jun 24 '13 at 02:09
  • 1
    *"It would also be great to be able to automatically run build.dart whenever a file changes"* -- use **File Watcher plugin** for such task -- it will execute whatever command you pass it (I believe you do know how to execute dart files from **command line/console**). Blog post about File Watchers: http://blog.jetbrains.com/webide/2013/03/file-watchers-in-webstormphpstorm-6-a-k-a-background-tasks/ – LazyOne Jun 24 '13 at 11:05
  • Using file watchers is a solution for creating WebUI Template output files on files changing. For running other dart files (cmd applications), please, see [this thread](http://devnet.jetbrains.com/thread/445728?tstart=0) – lena Jun 26 '13 at 13:09

1 Answers1

2

OK, thanks to LazyOne's hint I was able to dig a bit deeper.

The solution to this is to create a File Watcher in WebStorm with the following options:

Scope: Project Files
Program: [your path to]\dart-sdk\bin\dart.exe
Arguments: build.dart
Working Directory: $ProjectFileDir$

This will run the build.dart every time a file in your project changes, pretty much exactly like the Dart Editor.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Christine
  • 3,014
  • 2
  • 24
  • 34