Skip to content

Commit dac4a4a

Browse files
committed
feat: commit log
1 parent 1771f6c commit dac4a4a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/demo/src/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { copyOrCut, paste, getDocId, type WorkerMethod } from '@excel/shared';
1313
import './sentry';
1414
import Worker from './worker?worker';
1515

16+
console.log(import.meta.env);
17+
1618
const workerInstance = wrap<WorkerMethod>(new Worker());
1719

1820
async function initView() {
@@ -41,8 +43,9 @@ async function initView() {
4143
</StateContext.Provider>
4244
</StrictMode>,
4345
);
46+
document.body.append(`<!-- ${process.env.COMMIT_LOG} --> `);
4447
setTimeout(() => {
4548
document.getElementById('loading')?.remove();
46-
}, 500);
49+
}, 0);
4750
}
4851
initView();

packages/demo/vite.config.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { defineConfig } from 'vite';
22
import react from '@vitejs/plugin-react';
33
import { resolve } from 'path';
4+
import { execSync } from 'child_process';
5+
6+
const log = execSync('git log -1').toString();
47

58
export default defineConfig({
69
base: process.env.CI ? '/excel/' : '',
710
plugins: [react()],
811
define: {
912
'process.env.IS_E2E': JSON.stringify(process.env.IS_E2E || ''),
13+
'process.env.COMMIT_LOG': JSON.stringify(log || ''),
1014
},
1115
build: {
1216
sourcemap: true,

0 commit comments

Comments
 (0)