Skip to content

Detects whether an application is running in development or production

License

Notifications You must be signed in to change notification settings

vaadin/vaadin-development-mode-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 7, 2024
346e452 · May 7, 2024

History

70 Commits
Jul 18, 2018
Jul 18, 2018
Jul 18, 2018
May 7, 2024
Jul 18, 2018
Aug 8, 2018
Jan 25, 2022
May 7, 2024
May 7, 2024
Mar 17, 2023

Repository files navigation

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 npm install
  2. Run bower install
  3. Run npm start
  4. Open http://localhost:8081/test/index.html
  5. Verify that mode is development (green)
  6. Verify that importIfDevelopmentMode is run (green)
  7. Open http://<yourip>:8081/test/index.html
  8. Verify that mode is production (orange)
  9. Verify that importIfDevelopmentMode is ignored (orange)
  10. Run npm run start:prod
  11. Open http://localhost:8081/test/index.html
  12. Verify that mode is production (orange)
  13. Verify that importIfDevelopmentMode is ignored (orange)
  14. Open http://<yourip>:8081/test/index.html
    1. Verify that mode is production (orange)
    2. Verify that importIfDevelopmentMode is ignored (orange)