I am currently working on integrating Dart into the Rails Asset Pipeline.
Compilation is already working; .dart files are compiled into .js using the Asset Pipeline. However, there must also be an unrelated version of .dart that can be interpreted by Dartium.
The usual way is that .dart files are included in the html source of type "application/dart" . Then dart.js , which replaces these .dart files with the corresponding version of .js , if the browser does not understand Dart, replacding foo.dart with foo.dart.js
My problem is that the resource pipeline maintains the compiled version of JavaScript, even if the client requests foo.dart . foo.dart should serve as the original, uncompressed version, only foo.dart.js should be compiled.
Source ruby-dart and dart-rails
Change I was thinking of just copying the raw .dart files to a shared folder, but this is not an option, since the source file that is viewed in Asset Pipeline may include other .dart , which are then compiled into one single .js file. Thus, not all .dart files will be copied.
ruby-on-rails dart asset-pipeline
amiuhle
source share