@rosskevin/ifvisible
Version:
Cross-browser, lightweight way to check if user is looking at the page or interacting with it. (wrapper around HTML5 visibility api)
17 lines (10 loc) • 422 B
JavaScript
import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import { $ } from 'execa'
const $$ = $({ stdio: 'inherit' })
// TODO: promote this as a script to @alienfast/ci once it is stable
console.log('Resetting...')
const dir = dirname(fileURLToPath(import.meta.url))
await Promise.all([$$`node ${dir}/clean.js`, $$`node ${dir}/clean-yarn.js`])
console.log('Installing...')
await $$`yarn install`