fix: package affine/env modules (#2707)

This commit is contained in:
Himself65
2023-06-07 16:31:05 +08:00
committed by GitHub
parent 17b40b68df
commit f4be15baec
6 changed files with 6 additions and 24 deletions

View File

@@ -4,6 +4,7 @@
"main": "./src/index.ts",
"module": "./src/index.ts",
"devDependencies": {
"@affine/templates": "workspace:*",
"@blocksuite/global": "0.0.0-20230601122821-16196c35-nightly",
"next": "=13.4.2",
"react": "18.3.0-canary-16d053d59-20230506",
@@ -14,7 +15,7 @@
".": "./src/index.ts",
"./config": "./src/config.ts",
"./constant": "./src/constant.ts",
"./blocksuite": "./blocksuite/index.ts"
"./blocksuite": "./src/blocksuite/index.ts"
},
"peerDependencies": {
"@blocksuite/global": "0.0.0-20230409084303-221991d4-nightly"

View File

@@ -1,7 +1,3 @@
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="../env.d.ts" />
import { DebugLogger } from '@affine/debug';
import markdownTemplate from '@affine/templates/AFFiNE-beta-0.5.4.md';
import { ContentParser } from '@blocksuite/blocks/content-parser';
import type { Page } from '@blocksuite/store';
@@ -23,10 +19,8 @@ const demoTitle = markdown
const demoText = markdown.split('\n').slice(1).join('\n');
const logger = new DebugLogger('init-page');
export function initPage(page: Page): void {
logger.debug('initEmptyPage', page.id);
console.debug('initEmptyPage', page.id);
// Add page block and surface block at root level
const isFirstPage = page.meta.init === true;
if (isFirstPage) {
@@ -50,7 +44,7 @@ export function _initEmptyPage(page: Page, title?: string): void {
}
export function _initPageWithDemoMarkdown(page: Page): void {
logger.debug('initPageWithDefaultMarkdown', page.id);
console.debug('initPageWithDefaultMarkdown', page.id);
const pageBlockId = page.addBlock('affine:page', {
title: new page.Text(demoTitle),
});

View File

@@ -1,11 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"noEmit": false,
"outDir": "lib/blocksuite",
"target": "ESNext"
},
"include": ["./blocksuite/*.ts", "src/types.d.ts", "env.d.ts"],
"references": [{ "path": "../debug" }]
}

View File

@@ -6,5 +6,5 @@
"outDir": "lib"
},
"include": ["./src", "env.d.ts", "./src/global.d.ts"],
"exclude": ["blocksuite", "lib"]
"exclude": ["lib"]
}

View File

@@ -76,9 +76,6 @@
{
"path": "./packages/env"
},
{
"path": "./packages/env/tsconfig.blocksuite.json"
},
{
"path": "./packages/graphql"
},

View File

@@ -208,6 +208,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/env@workspace:packages/env"
dependencies:
"@affine/templates": "workspace:*"
"@blocksuite/global": 0.0.0-20230601122821-16196c35-nightly
lit: ^2.7.5
next: =13.4.2