From 3ed76b61a9e4f1314ceac5425bb106868f9b985e Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Tue, 19 Nov 2024 20:30:57 +0100 Subject: [PATCH] chore: add example projects --- examples/import-meta-current/index.ts | 10 ++++++++++ examples/import-meta-current/package.json | 18 ++++++++++++++++++ examples/import-meta-current/tsconfig.json | 6 ++++++ examples/import-meta-updated/index.ts | 10 ++++++++++ examples/import-meta-updated/package.json | 18 ++++++++++++++++++ examples/import-meta-updated/tsconfig.json | 6 ++++++ 6 files changed, 68 insertions(+) create mode 100644 examples/import-meta-current/index.ts create mode 100644 examples/import-meta-current/package.json create mode 100644 examples/import-meta-current/tsconfig.json create mode 100644 examples/import-meta-updated/index.ts create mode 100644 examples/import-meta-updated/package.json create mode 100644 examples/import-meta-updated/tsconfig.json diff --git a/examples/import-meta-current/index.ts b/examples/import-meta-current/index.ts new file mode 100644 index 00000000..e4a1360f --- /dev/null +++ b/examples/import-meta-current/index.ts @@ -0,0 +1,10 @@ +import chalk from "chalk"; +import * as Sentry from "@sentry/node"; + +function logSuccess(msg: string) { + console.log(chalk.green(msg)); + + Sentry.init({}) +} + +logSuccess("Hello World!"); diff --git a/examples/import-meta-current/package.json b/examples/import-meta-current/package.json new file mode 100644 index 00000000..915a9a5d --- /dev/null +++ b/examples/import-meta-current/package.json @@ -0,0 +1,18 @@ +{ + "name": "typescript", + "private": true, + "version": "0.0.0", + "license": "MIT", + "scripts": { + "dev": "ncc run index.ts", + "build": "ncc build index.ts -o dist" + }, + "dependencies": { + "@sentry/node": "^8.38.0", + "chalk": "^2.4.1" + }, + "devDependencies": { + "@vercel/ncc": "latest", + "typescript": "^4.4.2" + } +} diff --git a/examples/import-meta-current/tsconfig.json b/examples/import-meta-current/tsconfig.json new file mode 100644 index 00000000..57dce1f2 --- /dev/null +++ b/examples/import-meta-current/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "es2015", + "moduleResolution": "node" + } +} diff --git a/examples/import-meta-updated/index.ts b/examples/import-meta-updated/index.ts new file mode 100644 index 00000000..e4a1360f --- /dev/null +++ b/examples/import-meta-updated/index.ts @@ -0,0 +1,10 @@ +import chalk from "chalk"; +import * as Sentry from "@sentry/node"; + +function logSuccess(msg: string) { + console.log(chalk.green(msg)); + + Sentry.init({}) +} + +logSuccess("Hello World!"); diff --git a/examples/import-meta-updated/package.json b/examples/import-meta-updated/package.json new file mode 100644 index 00000000..f6643ccd --- /dev/null +++ b/examples/import-meta-updated/package.json @@ -0,0 +1,18 @@ +{ + "name": "typescript", + "private": true, + "version": "0.0.0", + "license": "MIT", + "scripts": { + "dev": "ncc run index.ts", + "build": "ncc build index.ts -o dist" + }, + "dependencies": { + "@sentry/node": "^8.38.0", + "chalk": "^2.4.1" + }, + "devDependencies": { + "@vercel/ncc": "file:../../", + "typescript": "^4.4.2" + } +} diff --git a/examples/import-meta-updated/tsconfig.json b/examples/import-meta-updated/tsconfig.json new file mode 100644 index 00000000..57dce1f2 --- /dev/null +++ b/examples/import-meta-updated/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "es2015", + "moduleResolution": "node" + } +}