fix: package affine/env modules (#2707)

This commit is contained in:
Himself65
2023-06-07 16:31:05 +08:00
committed by himself65
parent 35ea342709
commit f540863150
6 changed files with 23 additions and 26 deletions
+3 -2
View File
@@ -4,7 +4,8 @@
"main": "./src/index.ts",
"module": "./src/index.ts",
"devDependencies": {
"@blocksuite/global": "0.0.0-20230601101714-0d24ba91-nightly",
"@affine/templates": "workspace:*",
"@blocksuite/global": "0.0.0-20230601122821-16196c35-nightly",
"next": "=13.4.2",
"react": "18.3.0-canary-16d053d59-20230506",
"react-dom": "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"
@@ -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),
});
-11
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" }]
}
+1 -1
View File
@@ -6,5 +6,5 @@
"outDir": "lib"
},
"include": ["./src", "env.d.ts", "./src/global.d.ts"],
"exclude": ["blocksuite", "lib"]
"exclude": ["lib"]
}
-3
View File
@@ -76,9 +76,6 @@
{
"path": "./packages/env"
},
{
"path": "./packages/env/tsconfig.blocksuite.json"
},
{
"path": "./packages/graphql"
},
+17 -1
View File
@@ -208,7 +208,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/env@workspace:packages/env"
dependencies:
"@blocksuite/global": 0.0.0-20230601101714-0d24ba91-nightly
"@affine/templates": "workspace:*"
"@blocksuite/global": 0.0.0-20230601122821-16196c35-nightly
lit: ^2.7.5
next: =13.4.2
react: 18.3.0-canary-16d053d59-20230506
@@ -2656,6 +2657,21 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/global@npm:0.0.0-20230601122821-16196c35-nightly":
version: 0.0.0-20230601122821-16196c35-nightly
resolution: "@blocksuite/global@npm:0.0.0-20230601122821-16196c35-nightly"
dependencies:
ansi-colors: ^4.1.3
zod: ^3.21.4
peerDependencies:
lit: ^2.7
peerDependenciesMeta:
lit:
optional: true
checksum: 457cd685e12336988b061dcfd0b7c413b1e553ff0e59adaef6993bd0b5cf91643ad4c1dc132b2c785436da192280c542ce752608d1b07e697a473802de6f2a4c
languageName: node
linkType: hard
"@blocksuite/icons@npm:^2.1.19":
version: 2.1.19
resolution: "@blocksuite/icons@npm:2.1.19"