welcome.js 1.1 KB

12345678910111213141516171819202122232425
  1. /*
  2. Copyright 2019 Google LLC
  3. Use of this source code is governed by an MIT-style
  4. license that can be found in the LICENSE file or at
  5. https://opensource.org/licenses/MIT.
  6. */
  7. import { logger } from '../_private/logger.js';
  8. import '../_version.js';
  9. // A WorkboxCore instance must be exported before we can use the logger.
  10. // This is so it can get the current log level.
  11. if (process.env.NODE_ENV !== 'production') {
  12. const padding = ' ';
  13. logger.groupCollapsed('Welcome to Workbox!');
  14. logger.log(`You are currently using a development build. ` +
  15. `By default this will switch to prod builds when not on localhost. ` +
  16. `You can force this with workbox.setConfig({debug: true|false}).`);
  17. logger.log(`📖 Read the guides and documentation\n` +
  18. `${padding}https://developers.google.com/web/tools/workbox/`);
  19. logger.log(`❓ Use the [workbox] tag on Stack Overflow to ask questions\n` +
  20. `${padding}https://stackoverflow.com/questions/ask?tags=workbox`);
  21. logger.log(`🐛 Found a bug? Report it on GitHub\n` +
  22. `${padding}https://github.com/GoogleChrome/workbox/issues/new`);
  23. logger.groupEnd();
  24. }