feat: module resolve

feat: module resolve

fix: logger repository

fix: module resolve

chore: add workflow for module resolve

chore: update workflow env

chore: update workflow install

chore: update workflow env for npm token

chore: test docker

chore: update workflow env
This commit is contained in:
alt0
2022-10-18 01:31:40 +08:00
parent 0712391c7f
commit 88c8a408b5
19 changed files with 426 additions and 71 deletions

5
packages/logger/next-env.d.ts vendored Normal file
View File

@@ -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.

View File

@@ -0,0 +1,32 @@
{
"name": "@pathfinder/logger",
"version": "0.0.1",
"description": "",
"type": "module",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"exports": {
"./src/*": "./dist/src/*.js",
".": "./dist/src/index.js"
},
"scripts": {
"dev": "next dev",
"build": "tsc --project ./tsconfig.json"
},
"keywords": [],
"author": "",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+https://github.com/toeverything/AFFINE-pathfinder.git"
},
"dependencies": {
"next": "^12.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.21",
"typescript": "^4.8.4"
}
}

View File

@@ -0,0 +1,10 @@
import { Logger } from '../src';
const Page = () => {
return (
<div>
<h1>Track Example</h1>
<Logger />
</div>
);
};

View File

@@ -0,0 +1,9 @@
import { useEffect } from 'react';
export const Logger = () => {
useEffect(() => {
console.log('@pathfinder/logger: Render Track');
}, []);
return null;
};

View File

@@ -0,0 +1 @@
export { Logger } from './Logger';

View File

@@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": false,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"experimentalDecorators": true,
"declaration": true,
"baseUrl": ".",
"rootDir": ".",
"outDir": "./dist"
},
"include": ["next-env.d.ts", "src/**/*.ts", "pages/**/*.tsx"],
"exclude": ["node_modules", "dist"]
}