From 95d88eee5eb56987be4024d41f5d6800c3f8ab4c Mon Sep 17 00:00:00 2001 From: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:06:29 -0500 Subject: [PATCH] feat(nx-dev): remove unused component --- nx-dev/ui-home/src/index.ts | 1 - nx-dev/ui-home/src/lib/nx-is-fast.tsx | 273 -------------------------- 2 files changed, 274 deletions(-) delete mode 100644 nx-dev/ui-home/src/lib/nx-is-fast.tsx diff --git a/nx-dev/ui-home/src/index.ts b/nx-dev/ui-home/src/index.ts index cdb80732f87349..cfc8fee3fb23e5 100644 --- a/nx-dev/ui-home/src/index.ts +++ b/nx-dev/ui-home/src/index.ts @@ -7,7 +7,6 @@ export * from './lib/migrate'; export * from './lib/migrations-and-code-generation'; export * from './lib/monorepo-styles'; export * from './lib/newsletter'; -export * from './lib/nx-is-fast'; export * from './lib/nx-statistics'; export * from './lib/nx-with-ci'; export * from './lib/testimonials'; diff --git a/nx-dev/ui-home/src/lib/nx-is-fast.tsx b/nx-dev/ui-home/src/lib/nx-is-fast.tsx deleted file mode 100644 index 777b33eca0cd60..00000000000000 --- a/nx-dev/ui-home/src/lib/nx-is-fast.tsx +++ /dev/null @@ -1,273 +0,0 @@ -import { - AcademicCapIcon, - BeakerIcon, - ChartBarIcon, - CloudArrowDownIcon, - CubeTransparentIcon, - ServerStackIcon, -} from '@heroicons/react/24/outline'; -import { CogIcon } from '@heroicons/react/24/solid'; -import { Button, ButtonLink, SectionHeading } from '@nx/nx-dev/ui-common'; -import { - animate, - motion, - MotionValue, - useAnimation, - useMotionValue, - useTransform, -} from 'framer-motion'; -import { useEffect, useRef } from 'react'; -import { useInView } from 'react-intersection-observer'; - -function Counter({ - from = 0, - to = 10, - round = 0, - progress, -}: { - from: number; - to: number; - round: number; - progress: MotionValue; -}): JSX.Element { - const ref = useRef(); - const value = useTransform(progress, [0, 1000], [from, to], { - clamp: false, - }); - - const { format: formatNumber } = new Intl.NumberFormat('en-US', { - minimumFractionDigits: round, - maximumFractionDigits: round, - }); - - useEffect(() => { - return value.onChange((v) => { - if (ref !== undefined && ref.current !== undefined) - ref.current.firstChild.data = formatNumber( - round === 0 ? Math.round(v) : Number(v.toFixed(round)) - ); - }); - }, [formatNumber, round, value]); - - return {formatNumber(value.get())}; -} - -export function NxIsFast(): JSX.Element { - const progress: MotionValue = useMotionValue(0); - const controls = useAnimation(); - const [ref, inView] = useInView({ triggerOnce: true }); - - useEffect(() => { - if (!inView) return; - controls.start('visible'); - animate(progress, 1000, { - type: 'spring', - damping: 50, - }); - }, [controls, inView, progress]); - - return ( -
- -
-
- {/* - Nx is fast - */} - - Don't waste your time - -
-
-

- Nx makes scaling easy. Modern techniques such as{' '} - distributed task execution{' '} - and computation caching{' '} - make sure your CI times remain fast, even as you keep adding - projects to your workspace. -

-
-
-
-
-
Most workspaces see
- -
- 3 times reduction in CI time -
-
-
-
Average
- -
- 2.5 times reduction in - computation time -
-
-
-
-
-
- {/*
-
-
-
-

- - Never rebuild the same code twice -

-
-
- Nx is smart! It can figure out whether the same computation has - run before and can{' '} - - restore the files and the terminal output - {' '} - from its cache. -
-
- - Learn more about caching - -
-
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*

*/} - {/* */} - {/* Distributed task execution (DTE)*/} - {/*

*/} - {/*
*/} - {/*
*/} - {/* Smart, automated, dynamic distribution of tasks across multiple*/} - {/* machines to get{' '}*/} - {/* */} - {/* maximum parallelization and CPU efficient*/} - {/* {' '}*/} - {/* CI runs.*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*

*/} - {/* */} - {/* Remote caching*/} - {/*

*/} - {/*
*/} - {/*
*/} - {/* */} - {/* Share your local computation cache*/} - {/* {' '}*/} - {/* with team mates and your CI system for maximum efficiency.*/} - {/*
*/} - {/*
*/} - {/*
-
-
-
-

- - Only run what changed -

-
-
- Nothing is faster than not running a task. Nx analyzes your - project graph and can{' '} - - diff it against a baseline to determine which projects changed - {' '} - and what tasks need to be re-run. -
-
- - Learn more about the "affect" command - -
-
*/} -
-
-
- ); -}