Skip to content

Instantly share code, notes, and snippets.

@MikeMitterer
Last active January 4, 2016 08:39
Show Gist options
  • Save MikeMitterer/8596363 to your computer and use it in GitHub Desktop.
Save MikeMitterer/8596363 to your computer and use it in GitHub Desktop.
Two simple helper snippets for build.dart (entryPoints) + pubspec.yaml (transformers)
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