Skip to content

Instantly share code, notes, and snippets.

@BSFishy
BSFishy / deplist.ts
Created November 7, 2023 18:57
Get a list of dependencies required at runtime
import { nodeFileTrace } from '@vercel/nft';
import path from 'node:path';
import { lstat } from 'node:fs/promises';
async function run() {
const cwd = process.cwd();
const dir = process.argv[2];
if (!dir) {
throw 'You must specify the directory';
}
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
/* eslint-disable @typescript-eslint/no-var-requires */
const {
dependencies,
devDependencies,
peerDependencies,
@BSFishy
BSFishy / search.js
Created June 14, 2023 20:38
Search OSD for certain strings in certain files
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
const fs = require('fs');
const path = require('path');
const regex = /#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3})?|(?:rgb|rgba|hsl)\([^)]*\)/g;
@BSFishy
BSFishy / diff-dark.txt
Created June 14, 2023 18:10
With eui aliases removed
{
ouiButtonEmptyTypes: {
- primary: "#1ba9f5"
+ primary: "#159d8d"
- disabled: "#4c4e51"
+ disabled: "#535a62"
- ghost: "#ffffff"
+ ghost: "#fcfeff"
}
ouiCallOutTypes: {
@BSFishy
BSFishy / diff-light.txt
Created June 14, 2023 18:09
With eui aliases removed
{
ouiButtonEmptyTypes: {
- primary: "#006bb4"
+ primary: "#14786f"
- disabled: "#afb0b3"
+ disabled: "#a4aaaf"
- ghost: "#ffffff"
+ ghost: "#fcfeff"
- text: "#343741"
+ text: "#2a3947"
{
ouiButtonEmptyTypes: {
- primary: "#1ba9f5"
+ primary: "#159d8d"
- disabled: "#4c4e51"
+ disabled: "#535a62"
- ghost: "#ffffff"
+ ghost: "#fcfeff"
}
euiButtonEmptyTypes: {
{
ouiButtonEmptyTypes: {
- primary: "#006bb4"
+ primary: "#14786f"
- disabled: "#afb0b3"
+ disabled: "#a4aaaf"
- ghost: "#ffffff"
+ ghost: "#fcfeff"
- text: "#343741"
+ text: "#2a3947"
@BSFishy
BSFishy / search.js
Last active June 7, 2023 22:07
Search OSD for certain strings in certain files
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
const fs = require('fs');
const path = require('path');
const searchTerms = ['font family', 'font size', 'font weight', 'font style', 'line height']
.map((term) => term.split(' '))