Repository: PiyushSuthar/github-readme-quotes
Branch: master
Commit: 2dd6869712cc
Files: 19
Total size: 35.0 KB
Directory structure:
gitextract_cx1lemed/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── update_authorsmd.yml
├── .gitignore
├── .prettierrc
├── AUTHORS.md
├── LICENSE
├── README.md
├── api/
│ └── index.ts
├── data/
│ └── themes.json
├── package.json
├── scripts/
│ └── update-authors.sh
├── src/
│ ├── fetcher/
│ │ └── fetch-quotes.ts
│ └── renderer/
│ ├── constants.ts
│ ├── render-svg.ts
│ ├── theme/
│ │ └── awesome-card.ts
│ └── type/
│ ├── horizontal-card.ts
│ └── vertical-card.ts
├── tsconfig.json
└── vercel.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
ko_fi: piyush
================================================
FILE: .github/workflows/update_authorsmd.yml
================================================
name: Update AUTHORS.md
on:
push:
branches: [ main, master ]
permissions:
contents: write
jobs:
update-authors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Make the script file executable
run: chmod +x ./scripts/update-authors.sh
- name: Run script to update authors data
run: ./scripts/update-authors.sh
- name: Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "Autoupdate AUTHORS.md"
git push
================================================
FILE: .gitignore
================================================
# Node modules.
node_modules
package-lock.json
# Environmental variables.
.env
# Vercel.
.vercel
#package-lock
package-lock.json
================================================
FILE: .prettierrc
================================================
{
"trailingComma": "none",
"arrowParens": "avoid",
"singleQuote": true,
"printWidth": 80,
"useTabs": false,
"tabWidth": 2,
"semi": true
}
================================================
FILE: AUTHORS.md
================================================
# Authors
#### Ordered by first contribution.
- Piyush Suthar (<32237558+PiyushSuthar@users.noreply.github.com>)
- Ishaan Shaikh (<35690029+FlyingPhantom@users.noreply.github.com>)
- Mini Ware ()
- janaSunrise ()
- Abdullah Omar ()
- Samuel Corsi-House ()
- Reski Mulud Muchamad (<63949402+reskimulud@users.noreply.github.com>)
- MagicLike ()
- CodeWhiteWeb (<79645854+CodeWhiteWeb@users.noreply.github.com>)
- Ehan ()
- Mohamed Bechir Mejri (<76930306+MohamedBechirMejri@users.noreply.github.com>)
- Sunrit Jana ()
- AN ❦ (<108299225+krakxn@users.noreply.github.com>)
- Lucas Alexander ()
- PiyushSuthar ()
- Adam Ross (<14985050+R055A@users.noreply.github.com>)
- Ananth Krishnaswamy (<75056416+ANANTH-SWAMY@users.noreply.github.com>)
- U-L-M-S (<96896184+U-L-M-S@users.noreply.github.com>)
- Glitched Panda (<82221876+GlitchedPanda@users.noreply.github.com>)
- Gabriel Mitelman Tkacz ()
- github-actions[bot] ()
- Cole Morgan (<114717561+colemmorgan@users.noreply.github.com>)
- Piyush Suthar ()
#### Generated by scripts/update-authors.sh.
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Piyush Suthar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
## Features ✨
- [Dynamic quotes in your GitHub README](#Usage)
- [Customize your own quote](#Custom)
## Usage ⚡️
Copy the markdown below and paste it in your Github Readme.
```md
[](https://github.com/piyushsuthar/github-readme-quotes)
```
### Options
| Options | Default | Description |
| ------- | -------- | ------------------------------------------------------------------------------------------- |
| type | vertical | Available: horizontal, vertical |
| theme | light | [Available themes](#themes) |
| quote | - | Customize your quote |
| author | - | The name of the quote's author |
| border | false | Available: true, false |
Themes
- light
- dark
- algolia
- catppuccin
- catppuccin_frappe
- catppuccin_latte
- catppuccin_macchiato
- catppuccin_mocha
- chartreuse-dark
- dracula
- github
- github_dark
- github_blue
- graywhite
- gruvbox
- hackerman
- merko
- monokai
- moonlight
- nord
- radical
- shadow_blue
- shadow_green
- shadow_red
- tokyonight
## Installation and Development 🚀
To get started with developing this app locally, here are the steps:
Install the dependencies for the app using,
```sh
pnpm install
```
And then run the app using:
```sh
npx vercel dev
```
## Customization
### Horizontal
Add the **?type=horizontal** parameter.
[](https://github.com/piyushsuthar/github-readme-quotes)
### Border
Add the **?border=true** parameter.
[](https://github.com/piyushsuthar/github-readme-quotes)
### Theme
> The default theme will be light if a user is using light mode and dark themed if they are using dark mode.
### Light
> You need to add **?theme=light** parameter.
dark
[](https://github.com/piyushsuthar/github-readme-quotes)
catppuccin_mocha
[](https://github.com/piyushsuthar/github-readme-quotes)
tokyonight
[](https://github.com/piyushsuthar/github-readme-quotes)
monokai
[](https://github.com/piyushsuthar/github-readme-quotes)
github_dark
[](https://github.com/piyushsuthar/github-readme-quotes)
## Custom
### Custom Quotes
Add the **?quote=Your Quote** parameter.
You must [URL encode](https://en.wikipedia.org/wiki/Percent-encoding) your quote.
[](https://github.com/piyushsuthar/github-readme-quotes)
### Custom Colors
You can also customize colors directly via query parameters:
- `quoteColor`: Color for the quote text (hex code without #)
- `authorColor`: Color for the author text (hex code without #)
- `backgroundColor`: Color for the background (hex code without #)
- `symbolColor`: Color for the quote symbols (hex code without #)
Examples:
1. `?quoteColor=ff0000&authorColor=00ff00&backgroundColor=0000ff&symbolColor=ffff00`
[](https://github.com/piyushsuthar/github-readme-quotes)
2. `?theme=dark"eColor=ff0000` (This will use the dark theme but override the quote color with red.)
[](https://github.com/piyushsuthar/github-readme-quotes)
## Contributing 🤝
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/PiyushSuthar/github-readme-quotes/issues).
## Special Thanks ❤
- Inspired from [AnuragHazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats).
- [skolakoda/programming-quotes-api](https://github.com/skolakoda/programming-quotes-api) for Quotes API.
- And a huge shoutout to [Mini Ware](https://github.com/Mini-Ware) for his immense contribution to this project!
## Show your support 🌈
Be sure to drop a 🌟 if you like the project!
## Author 🤗
👤 **Piyush Suthar**
- Website: https://piyushsuthar.github.io
- Twitter: [@piyushsthr](https://twitter.com/piyushsthr)
- Github: [@PiyushSthr](https://github.com/PiyushSthr)
- LinkedIn: [@piyushsthr](https://linkedin.com/in/piyushsthr)
Made by Piyush with ❤ and TypeScript
================================================
FILE: api/index.ts
================================================
import type { VercelRequest, VercelResponse } from '@vercel/node';
import { fetchQuotes } from '../src/fetcher/fetch-quotes';
import { renderSVG } from '../src/renderer/render-svg';
import { themes } from '../src/renderer/theme/awesome-card';
import type { CardType } from '../src/renderer/render-svg';
interface ResponseQuery {
type: CardType;
theme: keyof typeof themes;
quote: string;
author: string;
border: boolean;
// Custom color parameters
quoteColor?: string;
authorColor?: string;
backgroundColor?: string;
symbolColor?: string;
}
const handler = async (req: VercelRequest, res: VercelResponse) => {
const {
type,
theme,
quote,
author,
border,
quoteColor,
authorColor,
backgroundColor,
symbolColor
} = req.query as unknown as ResponseQuery;
let data;
if (quote && author) {
data = {
quote: quote,
author: author
};
} else if (quote) {
data = {
quote: quote,
author: 'Me'
};
} else {
data = await fetchQuotes();
}
// Custom colors object
const customColors = {
quote: quoteColor,
author: authorColor,
background: backgroundColor,
symbol: symbolColor
};
// Send the quote image response.
res.setHeader('Content-Type', 'image/svg+xml');
res.setHeader('Cache-Control', `public, max-age=600`);
res.send(renderSVG(data, type, theme, border, customColors));
};
export default handler;
================================================
FILE: data/themes.json
================================================
{
"default": {
"quote": "333",
"author": "2f80ed",
"background": "fffefe",
"symbol": "4c71f2"
},
"defaultDarkModeSupport": {
"quote": "9f9f9f",
"author": "fff",
"background": "151515",
"symbol": "79ff97"
},
"chartreuse-dark": {
"quote": "fff",
"author": "7fff00",
"background": "000",
"symbol": "00AEFF"
},
"radical": {
"quote": "a9fef7",
"author": "fe428e",
"background": "141321",
"symbol": "f8d847"
},
"merko": {
"quote": "68b587",
"author": "abd200",
"background": "0a0f0b",
"symbol": "b7d364"
},
"gruvbox": {
"quote": "8ec07c",
"author": "fabd2f",
"background": "282828",
"symbol": "fe8019"
},
"tokyonight": {
"quote": "38bdae",
"author": "70a5fd",
"background": "1a1b27",
"symbol": "bf91f3"
},
"catppuccin": {
"quote": "96CDFB",
"author": "D9E0EE",
"background": "161320",
"symbol": "DDB6F2"
},
"catppuccin_latte": {
"quote": "179299",
"author": "4c4f69",
"background": "eff1f5",
"symbol": "8839ef"
},
"catppuccin_frappe": {
"quote": "81c8be",
"author": "c6d0f5",
"background": "303446",
"symbol": "ca9ee6"
},
"catppuccin_macchiato": {
"quote": "8bd5ca",
"author": "cad3f5",
"background": "24273a",
"symbol": "c6a0f6"
},
"catppuccin_mocha": {
"quote": "94e2d5",
"author": "cdd6f4",
"background": "1e1e2e",
"symbol": "cba6f7"
},
"algolia": {
"quote": "00ADFE",
"author": "FEFEFE",
"background": "050F2C",
"symbol": "26BB85"
},
"monokai": {
"quote": "EA1F6A",
"author": "CFCFC9",
"background": "272822",
"symbol": "E18905"
},
"dracula": {
"quote": "F8F8F2",
"author": "6272A4",
"background": "282A36",
"symbol": "FF79c6"
},
"nord": {
"quote": "D8DEE9",
"author": "4C566A",
"background": "2E3440",
"symbol": "88C0D0"
},
"github": {
"quote": "FFFFFF",
"author": "4C566A",
"background": "0D1117",
"symbol": "43C293"
},
"github_dark": {
"quote": "C3D1D9",
"author": "58A6FF",
"background": "0D1117",
"symbol": "1F6FEB"
},
"github_blue": {
"quote": "C7D5E0",
"author": "56A1F7",
"background": "0D1117",
"symbol": "F9826C"
},
"graywhite": {
"quote": "24292E",
"author": "24292E",
"background": "FFFFFF",
"symbol": "24292E"
},
"moonlight": {
"quote": "F8F8F8",
"author": "FF757F",
"background": "222436",
"symbol": "599DFF"
},
"hackerman": {
"quote": "00B3D6",
"author": "00B3D6",
"background": "000000",
"symbol": "00B3D6"
},
"shadow_red": {
"quote": "9A0000",
"author": "9A0000",
"background": "151515",
"symbol": "4F0000"
},
"shadow_green": {
"quote": "007A00",
"author": "007A00",
"background": "151515",
"symbol": "003D00"
},
"shadow_blue": {
"quote": "00779A",
"author": "00779A",
"background": "151515",
"symbol": "004490"
}
}
================================================
FILE: package.json
================================================
{
"name": "random-quotes-github-readme",
"version": "1.0.0",
"private": true,
"scripts": {
"format": "prettier --write \"./**/*.{ts,json,md}\""
},
"dependencies": {
"axios": "^1.0.0"
},
"author": "Piyush Suthar",
"license": "MIT",
"devDependencies": {
"@vercel/node": "^2.5.22",
"prettier": "^2.7.1",
"typescript": "^4.8.4",
"vercel": "^28.4.8"
}
}
================================================
FILE: scripts/update-authors.sh
================================================
#!/bin/sh
# Update AUTHORS.md based on git history.
git log --reverse --format='%aN (<%aE>)' | perl -we '
BEGIN {
%seen = (), @authors = ();
}
while (<>) {
next if $seen{$_};
next if /(dependabot\[bot\])/;
$seen{$_} = push @authors, "- ", $_;
}
END {
print "# Authors\n\n";
print "#### Ordered by first contribution.\n\n";
print @authors, "\n";
print "#### Generated by scripts/update-authors.sh.\n";
}
' > AUTHORS.md
================================================
FILE: src/fetcher/fetch-quotes.ts
================================================
import axios from 'axios';
interface ParseDataParams {
text: string;
author: string;
}
interface ParseDataReturn {
quote: string;
author: string;
}
const parseData = (data: ParseDataParams): ParseDataReturn => {
return {
quote: data.text,
author: data.author
};
};
// Recursively find a random quote of correct length.
const randomQuote = (data: ParseDataParams[]): ParseDataParams => {
// Filter out invalid entries.
const validQuotes = data.filter(quote => quote && typeof quote.text === 'string');
// If no valid quotes exist, throw an error.
if (validQuotes.length === 0) {
throw new Error('No valid quotes found in the data.');
}
// Get a random quote.
let randQuote = validQuotes[Math.floor(Math.random() * validQuotes.length)];
// Check length and recurse if necessary.
return randQuote.text.length < 220 ? randQuote : randomQuote(validQuotes);
};
export async function fetchQuotes(): Promise {
const response = await axios.get(
'https://github.com/mudroljub/programming-quotes-api/raw/master/data/quotes.json'
);
const data: ParseDataParams[] = response.data;
// Validate the fetched data.
if (!Array.isArray(data)) {
throw new Error('Fetched data is not an array.');
}
// Get a random quote.
let randQuote = randomQuote(data);
// Parse the data and return it.
return parseData(randQuote);
}
================================================
FILE: src/renderer/constants.ts
================================================
export const poppinsFontSVG = `
`;
================================================
FILE: src/renderer/render-svg.ts
================================================
import { renderTheme, themes } from './theme/awesome-card';
import { renderHorizontal } from './type/horizontal-card';
import { renderVertical } from './type/vertical-card';
export type CardType = 'vertical' | 'horizontal' | undefined;
export interface CustomColors {
quote?: string;
author?: string;
background?: string;
symbol?: string;
}
export const renderSVG = (
data: { quote: string; author: string },
type: CardType,
theme: keyof typeof themes,
border: boolean,
customColors?: CustomColors
) => {
const { quote, author } = data;
// If the theme exists in the list of themes, render the specific theme.
// Else, render the default theme.
// Also pass custom colors for overriding theme values
const color = renderTheme(theme, customColors);
switch (type) {
case 'vertical':
return renderVertical({ quote, author, color, border });
case 'horizontal':
return renderHorizontal({ quote, author, color, border });
default:
return renderVertical({ quote, author, color, border });
}
};
================================================
FILE: src/renderer/theme/awesome-card.ts
================================================
import themesData from '../../../data/themes.json';
export interface Theme {
quote: string;
author: string;
background: string;
symbol: string;
}
export interface CustomColors {
quote?: string;
author?: string;
background?: string;
symbol?: string;
}
export const themes: Record = themesData;
export const renderTheme = (theme: keyof typeof themes, customColors?: CustomColors): Theme | null => {
let baseTheme: Theme;
// If no theme, return null
if (theme == null && customColors == null) {
return null;
}
if (themes[theme] && theme !== 'light' && theme !== 'dark') {
baseTheme = themes[theme];
} else if (theme == 'dark') {
baseTheme = themes.defaultDarkModeSupport;
} else {
baseTheme = themes.default;
}
if (!customColors) {
return baseTheme;
}
return {
quote: customColors.quote || baseTheme.quote,
author: customColors.author || baseTheme.author,
background: customColors.background || baseTheme.background,
symbol: customColors.symbol || baseTheme.symbol
};
};
// Gets dynamic styles for the quote
export const getThemeStyles = (color : Theme | null, border: boolean) : string => {
// If there is a matching theme, use its styles
if (color) {
return `
.container {
background-color: #${color.background};
border: ${border ? "3px solid #"+color.symbol : "1px solid rgba(0, 0, 0, 0.2)"};
}
.container h3 {
color: #${color.quote};
}
.container h3::before, .container h3::after {
color: #${color.symbol};
}
.container p {
color: #${color.author};
}
`;
}
// If there is no theme explicitly provided, render dark/light mode
// based on user's color preferences.
return `
/* Default light theme */
.container {
background-color: #${themes.default.background};
border: ${border ? "3px solid #"+themes.default.symbol : "1px solid rgba(0, 0, 0, 0.2)"};
}
.container h3 {
color: #${themes.default.quote};
}
.container h3::before, .container h3::after {
color: #${themes.default.symbol};
}
.container p {
color: #${themes.default.author};
}
/* Override for dark mode based on system settings */
@media (prefers-color-scheme: dark) {
.container {
background-color: #${themes.defaultDarkModeSupport.background};
border: ${border ? "3px solid #"+themes.defaultDarkModeSupport.symbol : "1px solid rgba(0, 0, 0, 0.2)"};
}
.container h3 {
color: #${themes.defaultDarkModeSupport.quote};
}
.container h3::before, .container h3::after {
color: #${themes.defaultDarkModeSupport.symbol};
}
.container p {
color: #${themes.defaultDarkModeSupport.author};
}
}
`;
}
================================================
FILE: src/renderer/type/horizontal-card.ts
================================================
import { poppinsFontSVG } from '../constants';
import { getThemeStyles, Theme } from '../theme/awesome-card';
interface Props {
quote: string;
author: string;
color: Theme | null;
border: boolean;
}
export const renderHorizontal = ({ quote, author, color, border }: Props) => {
const themeStyles = getThemeStyles(color, border); // gets css styling for specific theme
const renderedSVG = `
`;
return renderedSVG;
};
================================================
FILE: src/renderer/type/vertical-card.ts
================================================
import { poppinsFontSVG } from '../constants';
import { getThemeStyles, Theme, themes } from '../theme/awesome-card';
interface Props {
quote: string;
author: string;
color: Theme | null ;
border: boolean;
}
export const renderVertical = ({ quote, author, color, border }: Props) => {
const themeStyles = getThemeStyles(color, border); // gets css styling for specific theme
const renderedSVG = `
`;
return renderedSVG;
};
================================================
FILE: tsconfig.json
================================================
{
"include": ["src", "api"],
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs" /* Specify what module code is generated. */,
//"rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
/* JavaScript Support */
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
// "outDir": "./", /* Specify an output folder for all emitted files. */
// "removeComments": true, /* Disable emitting comments. */
// "noEmit": true, /* Disable emitting files from a compilation. */
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
// "newLine": "crlf", /* Set the newline character for emitting files. */
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
/* Interop Constraints */
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
/* Type Checking */
"strict": true /* Enable all strict type-checking options. */,
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}
================================================
FILE: vercel.json
================================================
{
"functions": {
"api/*.ts": {
"memory": 128,
"maxDuration": 10
}
},
"redirects": [
{
"source": "/",
"destination": "https://github.com/PiyushSuthar/github-readme-quotes"
}
]
}