UNPKG

inactivejs

Version:

Detect when a user is idle or change tabs

20 lines (17 loc) 490 B
/* global require, process */ const mix = require('laravel-mix'); const { unlinkSync } = require('fs'); mix .webpackConfig({ output: { library: 'inactivejs', libraryExport: 'default', libraryTarget: 'umd', }, }) .js('src/index.js', 'dist') .sourceMaps(false) .then(() => unlinkSync('mix-manifest.json')); if (process.argv.findIndex(arg => arg === 'disable-notifications') !== -1) { mix.disableNotifications(); }