The following describes the behaviour of several npm commands, particularly w.r.t. the scripts that are run in each, for NPM version 6.5.0.
npm run preinstall- link binaries (node-gyp)
- for each
bincommand in other package:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Page Routing Demo</title> | |
| <script type="module" defer> | |
| import PageRouter from "./page-router.js"; | |
| import RouterLink from "./router-link.js"; |
| import { useState, useEffect } from "react" | |
| import { ChevronLeft, ChevronRight } from "react-feather" | |
| export default function Carousel({ | |
| children: slides, | |
| autoSlide = false, | |
| autoSlideInterval = 3000, | |
| }) { | |
| const [curr, setCurr] = useState(0) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Remove rubberband scrolling from web apps on mobile safari (iOS)</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="apple-touch-fullscreen" content="yes"> | |
| <meta id="extViewportMeta" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> | |
| <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
| <style> | |
| html, body {margin: 0; padding: 0; overflow: hidden} |
useViewportScroll is a great way to create a parallax effect as the page scrolls. In some cases however, we only want to scroll when an element is in the viewport area.
So for example, if we have a "landscape" scene, and want to animate the Sun object only when it's in view, we start with our useViewportScroll implementation:
function Sun(props) {
const { scrollY, scrollYProgress } = useViewportScroll();| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>DomContentLoaded</title> | |
| <script> | |
| let startTime = performance.now(); | |
| </script> | |
| <link rel="shortcut icon" href="./github.svg" /> |
| // test data | |
| const xs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
| const add = (x: number, y: number) => x + y | |
| const mult = (x: number, y: number) => x * y | |
| // types | |
| type Reducer<T, U> = (acc: U, x: T) => U | |
| type Reduce = <T, U>(f: Reducer<T, U>, acc: U, xs: readonly T[]) => U | |
| { | |
| // 1. baseline | |
| const reduce: Reduce = (f, acc, xs) => xs.reduce(f, acc) |
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
set inputVolume to 100
display notification "Volume set to 100" with title "✅ Microphone is on"