@vaadin/vaadin-development-mode-detector

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@vaadin/vaadin-development-mode-detector
102.0.68 days ago5 years agoMinified + gzip package size for @vaadin/vaadin-development-mode-detector in KB

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