Last active
January 4, 2016 08:39
-
-
Save MikeMitterer/8596363 to your computer and use it in GitHub Desktop.
Two simple helper snippets for build.dart (entryPoints) + pubspec.yaml (transformers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pubspec.yaml | |
---snip--- | |
echo "transformers:" && echo "- polymer:" && echo " entry_points:" && find web -name "index.html" | sed "s/\(.*\)/ - \1/g" | |
---snap--- | |
Produces: | |
transformers: | |
- polymer: | |
entry_points: | |
- web/auto_complete/index.html | |
- web/automatic_node_finding/index.html | |
- web/bind_component_field_to_model_field/index.html | |
- web/bind_number_to_text_field_with_filter/index.html | |
- web/bind_to_a_map/index.html | |
build.dart (remove the last comma from output) | |
---snip--- | |
echo "build(entryPoints: [" && find web -name "index.html" | sed "s/\(.*\)/ '\1',/g" && echo "], options: parseOptions(['--deploy']));" | |
---snap--- | |
Produces: | |
build(entryPoints: [ | |
'web/auto_complete/index.html', | |
'web/automatic_node_finding/index.html', | |
'web/bind_component_field_to_model_field/index.html', | |
'web/bind_number_to_text_field_with_filter/index.html' | |
], options: parseOptions(['--deploy'])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment