Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: entrypoint #6

Merged
merged 6 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
559 changes: 431 additions & 128 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-6b67494872-10.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions app/entrypoints/renderer/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { join } from 'path'
import { dirname } from 'path'

import { fileURLToPath } from 'url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

/** @type {import('next').NextConfig} */
export default {
experimental: {
externalDir: true,
outputFileTracingRoot: join(__dirname, './'),
esmExternals: 'loose',
},
compiler: {
styledComponents: true,
},
webpack: (webpackConfig, { webpack }) => {
webpackConfig.plugins.push(
new webpack.NormalModuleReplacementPlugin(new RegExp(/\.js$/), function (
/** @type {{ request: string }} */
resource
) {
resource.request = resource.request.replace('.js', '')
})
)
return webpackConfig
},
output: 'standalone',
}
23 changes: 23 additions & 0 deletions app/entrypoints/renderer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@identity/renderer-entrypoint",
"version": "0.0.1",
"license": "BSD-3-Clause",
"type": "module",
"scripts": {
"build": "yarn next build src --no-lint && rm ./src/.next/standalone/package.json ; cp -r ./src/.next/standalone ./dist && cp -r ./src/.next/static ./dist/src/.next/static && mv ./dist/src/server.js ./dist/src/index.cjs",
"dev": "yarn next dev src",
"prepack": "run build",
"start": "node dist/src/index.cjs"
},
"dependencies": {
"next": "14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "20.11.5",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"typescript": "5.2.2"
}
}
9 changes: 9 additions & 0 deletions app/entrypoints/renderer/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'

const RootLayout = ({ children }) => (
<html>
<body>{children}</body>
</html>
)

export default RootLayout
5 changes: 5 additions & 0 deletions app/entrypoints/renderer/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react'

const Page = () => <h1>Team management</h1>

export default Page
5 changes: 5 additions & 0 deletions app/entrypoints/renderer/src/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
23 changes: 23 additions & 0 deletions app/entrypoints/renderer/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"name": "template",
"name": "team-management",
"private": true,
"license": "BSD 3-Clause",
"scripts": {
"prepare": "husky"
},
"dependencies": {
"@emotion/react": "11.11.4",
"react": "18.3.1"
},
"workspaces": [
"app/**/*",
"ui/**/*"
],
"devDependencies": {
"@atls/code-service": "0.1.4",
"@atls/config-eslint": "0.0.12",
Expand All @@ -24,5 +21,12 @@
"prettier": "3.1.1",
"typescript": "5.2.2"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"linterIgnorePatterns": [
"**/next.config.js"
],
"skipLibCheck": true,
"typecheckIgnorePatterns": [
"**/next-env.d.ts"
]
}
18 changes: 18 additions & 0 deletions ui/theme/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@ui/theme",
"version": "0.0.1",
"private": true,
"license": "BSD-3-Clause",
"exports": {
".": "./src/index.ts"
},
"devDependencies": {
"@emotion/react": "11.11.4",
"@types/react": "18.3.1",
"react": "18.2.0"
},
"peerDependencies": {
"@emotion/react": "*",
"react": "*"
}
}
4 changes: 2 additions & 2 deletions ui/theme/src/theme.provider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as theme from './theme'
import * as theme from './theme'

import { ThemeProvider as EmotionThemeProvider } from '@emotion/react'

import React from 'react'
import React from 'react'

export const ThemeProvider = ({ children }) => (
<EmotionThemeProvider theme={theme}>{children}</EmotionThemeProvider>
Expand Down
Loading