This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts" setup> | |
const jsonld = { | |
"@context": "https://schema.org", | |
"@type": "BreadcrumbList", | |
"itemListElement": [{ | |
"@type": "ListItem", | |
"position": 1, | |
"name": "Books", | |
"item": "https://example.com/books" | |
}, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
data () { | |
const jsonld = { | |
"@context": "https://schema.org", | |
"@type": "BreadcrumbList", | |
"itemListElement": [{ | |
"@type": "ListItem", | |
"position": 1, | |
"name": "Books", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<script type="application/ld+json"> | |
{ | |
"@context": "https://schema.org", | |
"@type": "BreadcrumbList", | |
"itemListElement": [{ | |
"@type": "ListItem", | |
"position": 1, | |
"name": "Books", | |
"item": "https://example.com/books" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": "src" | |
"paths": { | |
"@utils/*": ["utils/*"], | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"dev": "ts-node-dev -r tsconfig-paths/register src/index.ts", | |
"start": "ts-node -r tsconfig-paths/register src/index.ts" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"dev": "ts-node-dev src/index.ts", | |
"start": "ts-node src/index.ts" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { pathsToModuleNameMapper } = require('ts-jest/utils') | |
const { compilerOptions } = require('./tsconfig') | |
module.exports = { | |
preset: 'ts-jest', | |
testEnvironment: 'node', | |
// this enables us to use tsconfig-paths with jest | |
modulePaths: [compilerOptions.baseUrl], | |
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
preset: 'ts-jest', | |
testEnvironment: 'node' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project/ | |
├─ tsconfig.json | |
├─ package.json | |
├─ src/ | |
│ ├─ index.ts | |
│ ├─ utils/ | |
│ │ ├─ file-with-stuff-i-need.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { someFunction } from '@utils/file-with-stuff-i-need' |
NewerOlder