config
This commit is contained in:
parent
c527aa7bb7
commit
39d2698f28
6
apps/api/src/app.controller.d.ts
vendored
Normal file
6
apps/api/src/app.controller.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { AppService } from './app.service';
|
||||||
|
export declare class AppController {
|
||||||
|
private readonly appService;
|
||||||
|
constructor(appService: AppService);
|
||||||
|
getHello(): string;
|
||||||
|
}
|
||||||
67
apps/api/src/app.controller.js
Normal file
67
apps/api/src/app.controller.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
||||||
|
var useValue = arguments.length > 2;
|
||||||
|
for (var i = 0; i < initializers.length; i++) {
|
||||||
|
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||||
|
}
|
||||||
|
return useValue ? value : void 0;
|
||||||
|
};
|
||||||
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||||
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||||
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||||
|
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||||
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||||
|
var _, done = false;
|
||||||
|
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||||
|
var context = {};
|
||||||
|
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||||
|
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||||
|
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||||
|
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||||
|
if (kind === "accessor") {
|
||||||
|
if (result === void 0) continue;
|
||||||
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||||
|
if (_ = accept(result.get)) descriptor.get = _;
|
||||||
|
if (_ = accept(result.set)) descriptor.set = _;
|
||||||
|
if (_ = accept(result.init)) initializers.unshift(_);
|
||||||
|
}
|
||||||
|
else if (_ = accept(result)) {
|
||||||
|
if (kind === "field") initializers.unshift(_);
|
||||||
|
else descriptor[key] = _;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||||
|
done = true;
|
||||||
|
};
|
||||||
|
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
||||||
|
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||||
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||||
|
};
|
||||||
|
import { Controller, Get } from '@nestjs/common';
|
||||||
|
let AppController = (() => {
|
||||||
|
let _classDecorators = [Controller()];
|
||||||
|
let _classDescriptor;
|
||||||
|
let _classExtraInitializers = [];
|
||||||
|
let _classThis;
|
||||||
|
let _instanceExtraInitializers = [];
|
||||||
|
let _getHello_decorators;
|
||||||
|
var AppController = _classThis = class {
|
||||||
|
constructor(appService) {
|
||||||
|
this.appService = (__runInitializers(this, _instanceExtraInitializers), appService);
|
||||||
|
}
|
||||||
|
getHello() {
|
||||||
|
return this.appService.getHello();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
__setFunctionName(_classThis, "AppController");
|
||||||
|
(() => {
|
||||||
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
||||||
|
_getHello_decorators = [Get()];
|
||||||
|
__esDecorate(_classThis, null, _getHello_decorators, { kind: "method", name: "getHello", static: false, private: false, access: { has: obj => "getHello" in obj, get: obj => obj.getHello }, metadata: _metadata }, null, _instanceExtraInitializers);
|
||||||
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
||||||
|
AppController = _classThis = _classDescriptor.value;
|
||||||
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
||||||
|
__runInitializers(_classThis, _classExtraInitializers);
|
||||||
|
})();
|
||||||
|
return AppController = _classThis;
|
||||||
|
})();
|
||||||
|
export { AppController };
|
||||||
1
apps/api/src/app.controller.spec.d.ts
vendored
Normal file
1
apps/api/src/app.controller.spec.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
18
apps/api/src/app.controller.spec.js
Normal file
18
apps/api/src/app.controller.spec.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { Test } from '@nestjs/testing';
|
||||||
|
import { AppController } from './app.controller';
|
||||||
|
import { AppService } from './app.service';
|
||||||
|
describe('AppController', () => {
|
||||||
|
let appController;
|
||||||
|
beforeEach(async () => {
|
||||||
|
const app = await Test.createTestingModule({
|
||||||
|
controllers: [AppController],
|
||||||
|
providers: [AppService],
|
||||||
|
}).compile();
|
||||||
|
appController = app.get(AppController);
|
||||||
|
});
|
||||||
|
describe('root', () => {
|
||||||
|
it('should return "Hello World!"', () => {
|
||||||
|
expect(appController.getHello()).toBe('Hello World!');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
2
apps/api/src/app.module.d.ts
vendored
Normal file
2
apps/api/src/app.module.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export declare class AppModule {
|
||||||
|
}
|
||||||
63
apps/api/src/app.module.js
Normal file
63
apps/api/src/app.module.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||||
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||||
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||||
|
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||||
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||||
|
var _, done = false;
|
||||||
|
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||||
|
var context = {};
|
||||||
|
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||||
|
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||||
|
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||||
|
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||||
|
if (kind === "accessor") {
|
||||||
|
if (result === void 0) continue;
|
||||||
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||||
|
if (_ = accept(result.get)) descriptor.get = _;
|
||||||
|
if (_ = accept(result.set)) descriptor.set = _;
|
||||||
|
if (_ = accept(result.init)) initializers.unshift(_);
|
||||||
|
}
|
||||||
|
else if (_ = accept(result)) {
|
||||||
|
if (kind === "field") initializers.unshift(_);
|
||||||
|
else descriptor[key] = _;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||||
|
done = true;
|
||||||
|
};
|
||||||
|
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
||||||
|
var useValue = arguments.length > 2;
|
||||||
|
for (var i = 0; i < initializers.length; i++) {
|
||||||
|
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||||
|
}
|
||||||
|
return useValue ? value : void 0;
|
||||||
|
};
|
||||||
|
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
||||||
|
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||||
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||||
|
};
|
||||||
|
import { Module } from '@nestjs/common';
|
||||||
|
import { AppController } from './app.controller';
|
||||||
|
import { AppService } from './app.service';
|
||||||
|
let AppModule = (() => {
|
||||||
|
let _classDecorators = [Module({
|
||||||
|
imports: [],
|
||||||
|
controllers: [AppController],
|
||||||
|
providers: [AppService],
|
||||||
|
})];
|
||||||
|
let _classDescriptor;
|
||||||
|
let _classExtraInitializers = [];
|
||||||
|
let _classThis;
|
||||||
|
var AppModule = _classThis = class {
|
||||||
|
};
|
||||||
|
__setFunctionName(_classThis, "AppModule");
|
||||||
|
(() => {
|
||||||
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
||||||
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
||||||
|
AppModule = _classThis = _classDescriptor.value;
|
||||||
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
||||||
|
__runInitializers(_classThis, _classExtraInitializers);
|
||||||
|
})();
|
||||||
|
return AppModule = _classThis;
|
||||||
|
})();
|
||||||
|
export { AppModule };
|
||||||
3
apps/api/src/app.service.d.ts
vendored
Normal file
3
apps/api/src/app.service.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export declare class AppService {
|
||||||
|
getHello(): string;
|
||||||
|
}
|
||||||
60
apps/api/src/app.service.js
Normal file
60
apps/api/src/app.service.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||||
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||||
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||||
|
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||||
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||||
|
var _, done = false;
|
||||||
|
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||||
|
var context = {};
|
||||||
|
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||||
|
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||||
|
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||||
|
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||||
|
if (kind === "accessor") {
|
||||||
|
if (result === void 0) continue;
|
||||||
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||||
|
if (_ = accept(result.get)) descriptor.get = _;
|
||||||
|
if (_ = accept(result.set)) descriptor.set = _;
|
||||||
|
if (_ = accept(result.init)) initializers.unshift(_);
|
||||||
|
}
|
||||||
|
else if (_ = accept(result)) {
|
||||||
|
if (kind === "field") initializers.unshift(_);
|
||||||
|
else descriptor[key] = _;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||||
|
done = true;
|
||||||
|
};
|
||||||
|
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
||||||
|
var useValue = arguments.length > 2;
|
||||||
|
for (var i = 0; i < initializers.length; i++) {
|
||||||
|
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||||
|
}
|
||||||
|
return useValue ? value : void 0;
|
||||||
|
};
|
||||||
|
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
||||||
|
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||||
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||||
|
};
|
||||||
|
import { Injectable } from '@nestjs/common';
|
||||||
|
let AppService = (() => {
|
||||||
|
let _classDecorators = [Injectable()];
|
||||||
|
let _classDescriptor;
|
||||||
|
let _classExtraInitializers = [];
|
||||||
|
let _classThis;
|
||||||
|
var AppService = _classThis = class {
|
||||||
|
getHello() {
|
||||||
|
return 'Hello World!';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
__setFunctionName(_classThis, "AppService");
|
||||||
|
(() => {
|
||||||
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
||||||
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
||||||
|
AppService = _classThis = _classDescriptor.value;
|
||||||
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
||||||
|
__runInitializers(_classThis, _classExtraInitializers);
|
||||||
|
})();
|
||||||
|
return AppService = _classThis;
|
||||||
|
})();
|
||||||
|
export { AppService };
|
||||||
1
apps/api/src/main.d.ts
vendored
Normal file
1
apps/api/src/main.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
8
apps/api/src/main.js
Normal file
8
apps/api/src/main.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { NestFactory } from '@nestjs/core';
|
||||||
|
import { AppModule } from './app.module';
|
||||||
|
async function bootstrap() {
|
||||||
|
var _a;
|
||||||
|
const app = await NestFactory.create(AppModule);
|
||||||
|
await app.listen((_a = process.env.PORT) !== null && _a !== void 0 ? _a : 3000);
|
||||||
|
}
|
||||||
|
bootstrap();
|
||||||
1
apps/api/test/app.e2e-spec.d.ts
vendored
Normal file
1
apps/api/test/app.e2e-spec.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
19
apps/api/test/app.e2e-spec.js
Normal file
19
apps/api/test/app.e2e-spec.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { Test } from '@nestjs/testing';
|
||||||
|
import * as request from 'supertest';
|
||||||
|
import { AppModule } from './../src/app.module';
|
||||||
|
describe('AppController (e2e)', () => {
|
||||||
|
let app;
|
||||||
|
beforeEach(async () => {
|
||||||
|
const moduleFixture = await Test.createTestingModule({
|
||||||
|
imports: [AppModule],
|
||||||
|
}).compile();
|
||||||
|
app = moduleFixture.createNestApplication();
|
||||||
|
await app.init();
|
||||||
|
});
|
||||||
|
it('/ (GET)', () => {
|
||||||
|
return request(app.getHttpServer())
|
||||||
|
.get('/')
|
||||||
|
.expect(200)
|
||||||
|
.expect('Hello World!');
|
||||||
|
});
|
||||||
|
});
|
||||||
3
apps/nextjs-app/next.config.d.ts
vendored
Normal file
3
apps/nextjs-app/next.config.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import type { NextConfig } from "next";
|
||||||
|
declare const nextConfig: NextConfig;
|
||||||
|
export default nextConfig;
|
||||||
4
apps/nextjs-app/next.config.js
Normal file
4
apps/nextjs-app/next.config.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
const nextConfig = {
|
||||||
|
/* config options here */
|
||||||
|
};
|
||||||
|
export default nextConfig;
|
||||||
6
apps/nextjs-app/src/app/layout.d.ts
vendored
Normal file
6
apps/nextjs-app/src/app/layout.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
import "./globals.css";
|
||||||
|
export declare const metadata: Metadata;
|
||||||
|
export default function RootLayout({ children, }: Readonly<{
|
||||||
|
children: React.ReactNode;
|
||||||
|
}>): import("react").JSX.Element;
|
||||||
21
apps/nextjs-app/src/app/layout.jsx
Normal file
21
apps/nextjs-app/src/app/layout.jsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
|
import "./globals.css";
|
||||||
|
const geistSans = Geist({
|
||||||
|
variable: "--font-geist-sans",
|
||||||
|
subsets: ["latin"],
|
||||||
|
});
|
||||||
|
const geistMono = Geist_Mono({
|
||||||
|
variable: "--font-geist-mono",
|
||||||
|
subsets: ["latin"],
|
||||||
|
});
|
||||||
|
export const metadata = {
|
||||||
|
title: "Create Next App",
|
||||||
|
description: "Generated by create next app",
|
||||||
|
};
|
||||||
|
export default function RootLayout({ children, }) {
|
||||||
|
return (<html lang="en">
|
||||||
|
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
||||||
|
{children}
|
||||||
|
</body>
|
||||||
|
</html>);
|
||||||
|
}
|
||||||
1
apps/nextjs-app/src/app/page.d.ts
vendored
Normal file
1
apps/nextjs-app/src/app/page.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export default function Home(): import("react").JSX.Element;
|
||||||
44
apps/nextjs-app/src/app/page.jsx
Normal file
44
apps/nextjs-app/src/app/page.jsx
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import Image from "next/image";
|
||||||
|
export default function Home() {
|
||||||
|
return (<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||||
|
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
|
||||||
|
<Image className="dark:invert" src="/next.svg" alt="Next.js logo" width={180} height={38} priority/>
|
||||||
|
<ol className="list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
|
||||||
|
<li className="mb-2 tracking-[-.01em]">
|
||||||
|
Get started by editing{" "}
|
||||||
|
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
|
||||||
|
src/app/page.tsx
|
||||||
|
</code>
|
||||||
|
.
|
||||||
|
</li>
|
||||||
|
<li className="tracking-[-.01em]">
|
||||||
|
Save and see your changes instantly.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<div className="flex gap-4 items-center flex-col sm:flex-row">
|
||||||
|
<a className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto" href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image className="dark:invert" src="/vercel.svg" alt="Vercel logomark" width={20} height={20}/>
|
||||||
|
Deploy now
|
||||||
|
</a>
|
||||||
|
<a className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]" href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
|
||||||
|
Read our docs
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer className="row-start-3 flex gap-[24px] flex-wrap items-center justify-center">
|
||||||
|
<a className="flex items-center gap-2 hover:underline hover:underline-offset-4" href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image aria-hidden src="/file.svg" alt="File icon" width={16} height={16}/>
|
||||||
|
Learn
|
||||||
|
</a>
|
||||||
|
<a className="flex items-center gap-2 hover:underline hover:underline-offset-4" href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image aria-hidden src="/window.svg" alt="Window icon" width={16} height={16}/>
|
||||||
|
Examples
|
||||||
|
</a>
|
||||||
|
<a className="flex items-center gap-2 hover:underline hover:underline-offset-4" href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image aria-hidden src="/globe.svg" alt="Globe icon" width={16} height={16}/>
|
||||||
|
Go to nextjs.org →
|
||||||
|
</a>
|
||||||
|
</footer>
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
6
apps/web/app/layout.d.ts
vendored
Normal file
6
apps/web/app/layout.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
import "./globals.css";
|
||||||
|
export declare const metadata: Metadata;
|
||||||
|
export default function RootLayout({ children, }: Readonly<{
|
||||||
|
children: React.ReactNode;
|
||||||
|
}>): import("react").JSX.Element;
|
||||||
21
apps/web/app/layout.jsx
Normal file
21
apps/web/app/layout.jsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import localFont from "next/font/local";
|
||||||
|
import "./globals.css";
|
||||||
|
const geistSans = localFont({
|
||||||
|
src: "./fonts/GeistVF.woff",
|
||||||
|
variable: "--font-geist-sans",
|
||||||
|
});
|
||||||
|
const geistMono = localFont({
|
||||||
|
src: "./fonts/GeistMonoVF.woff",
|
||||||
|
variable: "--font-geist-mono",
|
||||||
|
});
|
||||||
|
export const metadata = {
|
||||||
|
title: "Create Next App",
|
||||||
|
description: "Generated by create next app",
|
||||||
|
};
|
||||||
|
export default function RootLayout({ children, }) {
|
||||||
|
return (<html lang="en">
|
||||||
|
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
||||||
|
{children}
|
||||||
|
</body>
|
||||||
|
</html>);
|
||||||
|
}
|
||||||
1
apps/web/app/page.d.ts
vendored
Normal file
1
apps/web/app/page.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export default function Home(): import("react").JSX.Element;
|
||||||
46
apps/web/app/page.jsx
Normal file
46
apps/web/app/page.jsx
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import Image from "next/image";
|
||||||
|
import { Button } from "@repo/ui/button";
|
||||||
|
import styles from "./page.module.css";
|
||||||
|
const ThemeImage = (props) => {
|
||||||
|
const { srcLight, srcDark, ...rest } = props;
|
||||||
|
return (<>
|
||||||
|
<Image {...rest} src={srcLight} className="imgLight"/>
|
||||||
|
<Image {...rest} src={srcDark} className="imgDark"/>
|
||||||
|
</>);
|
||||||
|
};
|
||||||
|
export default function Home() {
|
||||||
|
return (<div className={styles.page}>
|
||||||
|
<main className={styles.main}>
|
||||||
|
<ThemeImage className={styles.logo} srcLight="turborepo-dark.svg" srcDark="turborepo-light.svg" alt="Turborepo logo" width={180} height={38} priority/>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
Get started by editing <code>apps/web/app/page.tsx</code>
|
||||||
|
</li>
|
||||||
|
<li>Save and see your changes instantly.</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<div className={styles.ctas}>
|
||||||
|
<a className={styles.primary} href="https://vercel.com/new/clone?demo-description=Learn+to+implement+a+monorepo+with+a+two+Next.js+sites+that+has+installed+three+local+packages.&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F4K8ZISWAzJ8X1504ca0zmC%2F0b21a1c6246add355e55816278ef54bc%2FBasic.png&demo-title=Monorepo+with+Turborepo&demo-url=https%3A%2F%2Fexamples-basic-web.vercel.sh%2F&from=templates&project-name=Monorepo+with+Turborepo&repository-name=monorepo-turborepo&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fturborepo%2Ftree%2Fmain%2Fexamples%2Fbasic&root-directory=apps%2Fdocs&skippable-integrations=1&teamSlug=vercel&utm_source=create-turbo" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image className={styles.logo} src="/vercel.svg" alt="Vercel logomark" width={20} height={20}/>
|
||||||
|
Deploy now
|
||||||
|
</a>
|
||||||
|
<a href="https://turbo.build/repo/docs?utm_source" target="_blank" rel="noopener noreferrer" className={styles.secondary}>
|
||||||
|
Read our docs
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<Button appName="web" className={styles.secondary}>
|
||||||
|
Open alert
|
||||||
|
</Button>
|
||||||
|
</main>
|
||||||
|
<footer className={styles.footer}>
|
||||||
|
<a href="https://vercel.com/templates?search=turborepo&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image aria-hidden src="/window.svg" alt="Window icon" width={16} height={16}/>
|
||||||
|
Examples
|
||||||
|
</a>
|
||||||
|
<a href="https://turbo.build?utm_source=create-turbo" target="_blank" rel="noopener noreferrer">
|
||||||
|
<Image aria-hidden src="/globe.svg" alt="Globe icon" width={16} height={16}/>
|
||||||
|
Go to turbo.build →
|
||||||
|
</a>
|
||||||
|
</footer>
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
1
packages/auth-api/tsconfig.tsbuildinfo
Normal file
1
packages/auth-api/tsconfig.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
1
packages/auth-core/tsconfig.tsbuildinfo
Normal file
1
packages/auth-core/tsconfig.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
@ -3,7 +3,12 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"jsx": "react-jsx"
|
"jsx": "react-jsx",
|
||||||
|
"composite": true,
|
||||||
|
"preserveSymlinks": true
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"],
|
||||||
|
"references": [
|
||||||
|
{ "path": "../auth-core" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
1
packages/auth-ui/tsconfig.tsbuildinfo
Normal file
1
packages/auth-ui/tsconfig.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
8
packages/ui/src/button.d.ts
vendored
Normal file
8
packages/ui/src/button.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { ReactNode } from "react";
|
||||||
|
interface ButtonProps {
|
||||||
|
children: ReactNode;
|
||||||
|
className?: string;
|
||||||
|
appName: string;
|
||||||
|
}
|
||||||
|
export declare const Button: ({ children, className, appName }: ButtonProps) => import("react").JSX.Element;
|
||||||
|
export {};
|
||||||
6
packages/ui/src/button.jsx
Normal file
6
packages/ui/src/button.jsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
"use client";
|
||||||
|
export const Button = ({ children, className, appName }) => {
|
||||||
|
return (<button className={className} onClick={() => alert(`Hello from your ${appName} app!`)}>
|
||||||
|
{children}
|
||||||
|
</button>);
|
||||||
|
};
|
||||||
7
packages/ui/src/card.d.ts
vendored
Normal file
7
packages/ui/src/card.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { type JSX } from "react";
|
||||||
|
export declare function Card({ className, title, children, href, }: {
|
||||||
|
className?: string;
|
||||||
|
title: string;
|
||||||
|
children: React.ReactNode;
|
||||||
|
href: string;
|
||||||
|
}): JSX.Element;
|
||||||
8
packages/ui/src/card.jsx
Normal file
8
packages/ui/src/card.jsx
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export function Card({ className, title, children, href, }) {
|
||||||
|
return (<a className={className} href={`${href}?utm_source=create-turbo&utm_medium=basic&utm_campaign=create-turbo"`} rel="noopener noreferrer" target="_blank">
|
||||||
|
<h2>
|
||||||
|
{title} <span>-></span>
|
||||||
|
</h2>
|
||||||
|
<p>{children}</p>
|
||||||
|
</a>);
|
||||||
|
}
|
||||||
5
packages/ui/src/code.d.ts
vendored
Normal file
5
packages/ui/src/code.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { type JSX } from "react";
|
||||||
|
export declare function Code({ children, className, }: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
className?: string;
|
||||||
|
}): JSX.Element;
|
||||||
3
packages/ui/src/code.jsx
Normal file
3
packages/ui/src/code.jsx
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export function Code({ children, className, }) {
|
||||||
|
return <code className={className}>{children}</code>;
|
||||||
|
}
|
||||||
2
packages/ui/turbo/generators/config.d.ts
vendored
Normal file
2
packages/ui/turbo/generators/config.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
import type { PlopTypes } from "@turbo/gen";
|
||||||
|
export default function generator(plop: PlopTypes.NodePlopAPI): void;
|
||||||
27
packages/ui/turbo/generators/config.js
Normal file
27
packages/ui/turbo/generators/config.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation
|
||||||
|
export default function generator(plop) {
|
||||||
|
// A simple generator to add a new React component to the internal UI library
|
||||||
|
plop.setGenerator("react-component", {
|
||||||
|
description: "Adds a new react component",
|
||||||
|
prompts: [
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
name: "name",
|
||||||
|
message: "What is the name of the component?",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
type: "add",
|
||||||
|
path: "src/{{kebabCase name}}.tsx",
|
||||||
|
templateFile: "templates/component.hbs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "append",
|
||||||
|
path: "package.json",
|
||||||
|
pattern: /"exports": {(?<insertion>)/g,
|
||||||
|
template: ' "./{{kebabCase name}}": "./src/{{kebabCase name}}.tsx",',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -13,6 +13,8 @@
|
|||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
|
"composite": true,
|
||||||
|
"declaration": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": ["./src/*"],
|
||||||
@ -25,5 +27,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"],
|
||||||
"include": ["**/*.ts", "**/*.tsx"]
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
|
"references": [
|
||||||
|
{ "path": "packages/auth-core" },
|
||||||
|
{ "path": "packages/auth-api" },
|
||||||
|
{ "path": "packages/auth-ui" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
1
tsconfig.tsbuildinfo
Normal file
1
tsconfig.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user