mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
fix: package affine/env modules (#2707)
This commit is contained in:
3
packages/env/package.json
vendored
3
packages/env/package.json
vendored
@@ -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"
|
||||
|
||||
@@ -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
packages/env/tsconfig.blocksuite.json
vendored
11
packages/env/tsconfig.blocksuite.json
vendored
@@ -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" }]
|
||||
}
|
||||
2
packages/env/tsconfig.json
vendored
2
packages/env/tsconfig.json
vendored
@@ -6,5 +6,5 @@
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["./src", "env.d.ts", "./src/global.d.ts"],
|
||||
"exclude": ["blocksuite", "lib"]
|
||||
"exclude": ["lib"]
|
||||
}
|
||||
|
||||
@@ -76,9 +76,6 @@
|
||||
{
|
||||
"path": "./packages/env"
|
||||
},
|
||||
{
|
||||
"path": "./packages/env/tsconfig.blocksuite.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/graphql"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user