Skip to content

Instantly share code, notes, and snippets.

View cnative100's full-sized avatar

Chris Newman cnative100

  • DirtyPixels
  • Earlysville, VA
View GitHub Profile
@cnative100
cnative100 / README.md
Last active March 9, 2017 15:44
Processing Dynamically Created Input Elements in Polymer

It's common to have elements in a Polymer app that are dynamically rendered. Creating and processing these elements is fairly straightforward, but it's surprisingly difficult to find good information on doing it (at least as of this writing).

These code snippets show:

1.) How to create dynamic elements with a repeater template
2.) How to generate a unique id for each element
3.) How to access those elements in the Javascript with the query selector

@cnative100
cnative100 / README.md
Last active February 26, 2017 02:27
Krausening (Externalized) Properties for GreenMaven

This is an example of the Krausening setup on Windows. We use Krausening (https://bitbucket.org/askllc/krausening) to manage properties externally as we bounce between OS and machines for dev, test, and prod.

@cnative100
cnative100 / README.md
Last active February 23, 2017 22:30
Externalized Properties in JS

These snippets demonstrate externalizing an application configuration for Javascript. This is useful to 1.) keep application configuration declarations out of your code so they can be easy changed throughout the application, and 2.) manage configuration across multiple environments where app configuration may be different for each target.

To implement:

  1. Create an identical app config JS file for each target (e.g. dev, test, prod)
  2. Modify the configuration variables in each config for each target
  3. Put each of these files in the same app_config folder at the root of your app, and add to SCM