vaadin/vaadin-development-mode-detector

Name: vaadin-development-mode-detector

Owner: Vaadin

Description: Detects whether an application is running in development or production

Created: 2017-11-13 07:52:57.0

Updated: 2018-02-01 07:55:51.0

Pushed: 2018-05-10 16:54:42.0

Homepage:

Size: 30

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Utility method for detecting that an application using Vaadin Elements is running in development mode

Running Tests

There are no automatic tests as the functionality depends on the host the code is run on (localhost vs others) and the bundling status.

To verify functionality:

  1. Run bower install
  2. Run cd test && bower install ; cd ..
  3. Run polyserve -H 0.0.0.0
  4. Open http://localhost:8080/test/index.html
  5. Verify that mode is development (green)
  6. Verify that importIfDevelopmentMode is imported (green)
  7. Open http://<yourip>:8080/test/index.html
  8. Verify that mode is production (orange)
  9. Verify that importIfDevelopmentMode is ignored (orange)
  10. Run cd test/bower_components && ln -s ../../vaadin-development-mode-detector.html && cd .. && polymer build --bundle
  11. Open http://localhost:8080/test/build/default/index.html
  12. Verify that mode is production (orange)
  13. Verify that importIfDevelopmentMode is ignored (orange)
  14. Open http://<yourip>:8080/test/build/default/index.html
    1. Verify that mode is production (orange)
    2. Verify that importIfDevelopmentMode is ignored (orange)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.