Pergunta

I want to have some example sites in my web framework package. The sites run ok if I just want to run them as dart only implementations, but if I want to compile them to javascript I currently copy the sub folder out from my packages /example directory and into a new packages folders /web directory, as I only know how to get dart build to compile the client side code to javascript if its in the web directory. Is there anyway of telling dart build to run in a different root folder? like pkgRoot/example/example_1?

Foi útil?

Solução

pub build example works fine for me but not yet for Polymer projects (this is work in progress)

Polymer doesn't like when it has a transformer configuration in the package where elements are imported from.

I maintain two polymer elements packages (polymer_elements/polymer_ui_elements).
I have the example files in example but use another package (e.g. polymer_elements_examples) to build the examples to JavaScript.
This polymer_elements_examples has a pubspec.yaml file with a dependency to polymer_elements, a transformer configuration for the entry pages, and example as a symbolic link to polymer_elements_examples

I then build the examples in polymer_elements_examples with pub build example.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top