How to configure Dart Editor to build “.UXL” files

三世轮回 提交于 2019-12-11 12:52:23

问题


I have the demo code for the Rikulo UXL ScrollView demo working with the Dart Editor.

  • UXL Overview

However, the set-up seems cumbersome to me. For the example to build the .Dart file from the UXL file, (apparently) it needs to be named as: "ScrollView.uxl.xml". Can the build process or Dart Editor be configured and set-up to do a more streamlined workflow like:

ScrollView.uxl --> ScrollView.dart

As opposed to the current rule:

ScrollView.uxl.xml --> ScrollView.uxl.dart

It seem to me the solution seems to lie in the UXL builder:

import 'package:rikulo_uxl/uc.dart';

Solutions welcome.


回答1:


The readme of the package seems to contain exactly the code you are looking for:

https://github.com/rikulo/uxl

add this to your build.dart file (in the directory where your pubspec.yaml file is

import 'package:rikulo_uxl/uc.dart' show build;

void main(List<String> arguments) {
    build(arguments);
}


来源:https://stackoverflow.com/questions/22710941/how-to-configure-dart-editor-to-build-uxl-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!