mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 22:18:54 +08:00
fix: package affine/env modules (#2707)
This commit is contained in:
Vendored
+2
-1
@@ -4,6 +4,7 @@
|
|||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
"module": "./src/index.ts",
|
"module": "./src/index.ts",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@affine/templates": "workspace:*",
|
||||||
"@blocksuite/global": "0.0.0-20230601122821-16196c35-nightly",
|
"@blocksuite/global": "0.0.0-20230601122821-16196c35-nightly",
|
||||||
"next": "=13.4.2",
|
"next": "=13.4.2",
|
||||||
"react": "18.3.0-canary-16d053d59-20230506",
|
"react": "18.3.0-canary-16d053d59-20230506",
|
||||||
@@ -14,7 +15,7 @@
|
|||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
"./config": "./src/config.ts",
|
"./config": "./src/config.ts",
|
||||||
"./constant": "./src/constant.ts",
|
"./constant": "./src/constant.ts",
|
||||||
"./blocksuite": "./blocksuite/index.ts"
|
"./blocksuite": "./src/blocksuite/index.ts"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@blocksuite/global": "0.0.0-20230409084303-221991d4-nightly"
|
"@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 markdownTemplate from '@affine/templates/AFFiNE-beta-0.5.4.md';
|
||||||
import { ContentParser } from '@blocksuite/blocks/content-parser';
|
import { ContentParser } from '@blocksuite/blocks/content-parser';
|
||||||
import type { Page } from '@blocksuite/store';
|
import type { Page } from '@blocksuite/store';
|
||||||
@@ -23,10 +19,8 @@ const demoTitle = markdown
|
|||||||
|
|
||||||
const demoText = markdown.split('\n').slice(1).join('\n');
|
const demoText = markdown.split('\n').slice(1).join('\n');
|
||||||
|
|
||||||
const logger = new DebugLogger('init-page');
|
|
||||||
|
|
||||||
export function initPage(page: Page): void {
|
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
|
// Add page block and surface block at root level
|
||||||
const isFirstPage = page.meta.init === true;
|
const isFirstPage = page.meta.init === true;
|
||||||
if (isFirstPage) {
|
if (isFirstPage) {
|
||||||
@@ -50,7 +44,7 @@ export function _initEmptyPage(page: Page, title?: string): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function _initPageWithDemoMarkdown(page: Page): void {
|
export function _initPageWithDemoMarkdown(page: Page): void {
|
||||||
logger.debug('initPageWithDefaultMarkdown', page.id);
|
console.debug('initPageWithDefaultMarkdown', page.id);
|
||||||
const pageBlockId = page.addBlock('affine:page', {
|
const pageBlockId = page.addBlock('affine:page', {
|
||||||
title: new page.Text(demoTitle),
|
title: new page.Text(demoTitle),
|
||||||
});
|
});
|
||||||
-11
@@ -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" }]
|
|
||||||
}
|
|
||||||
Vendored
+1
-1
@@ -6,5 +6,5 @@
|
|||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"include": ["./src", "env.d.ts", "./src/global.d.ts"],
|
"include": ["./src", "env.d.ts", "./src/global.d.ts"],
|
||||||
"exclude": ["blocksuite", "lib"]
|
"exclude": ["lib"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,9 +76,6 @@
|
|||||||
{
|
{
|
||||||
"path": "./packages/env"
|
"path": "./packages/env"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "./packages/env/tsconfig.blocksuite.json"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "./packages/graphql"
|
"path": "./packages/graphql"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@affine/env@workspace:packages/env"
|
resolution: "@affine/env@workspace:packages/env"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
"@affine/templates": "workspace:*"
|
||||||
"@blocksuite/global": 0.0.0-20230601122821-16196c35-nightly
|
"@blocksuite/global": 0.0.0-20230601122821-16196c35-nightly
|
||||||
lit: ^2.7.5
|
lit: ^2.7.5
|
||||||
next: =13.4.2
|
next: =13.4.2
|
||||||
|
|||||||
Reference in New Issue
Block a user