mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
chore: move ci.js to ci.cjs
This commit is contained in:
@@ -36,7 +36,7 @@ jobs:
|
||||
scope: '@toeverything'
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: node scripts/module-resolve/ci.js
|
||||
- run: node scripts/module-resolve/ci.cjs
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
|
||||
@@ -244,7 +244,7 @@ jobs:
|
||||
scope: '@toeverything'
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: node scripts/module-resolve/ci.js
|
||||
- run: node scripts/module-resolve/ci.cjs
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
scope: '@toeverything'
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: node scripts/module-resolve/ci.js
|
||||
- run: node scripts/module-resolve/ci.cjs
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
|
||||
@@ -48,6 +48,7 @@ Thumbs.db
|
||||
out/
|
||||
|
||||
module-resolve.js
|
||||
module-resolve.cjs
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
const fs = require('fs');
|
||||
|
||||
function getCustomize() {
|
||||
const customed = fs.existsSync('./module-resolve.js');
|
||||
const customed = fs.existsSync('./module-resolve.cjs');
|
||||
if (!customed) {
|
||||
return null;
|
||||
}
|
||||
const script = require('./module-resolve.js');
|
||||
const script = require('./module-resolve.cjs');
|
||||
return script && script.resolve;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,9 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const templatePath = path.resolve(__dirname, 'module-resolve.tmpl.js');
|
||||
const destinationPath = path.resolve(__dirname, '../../module-resolve.js');
|
||||
const destinationPath = path.resolve(__dirname, '../../module-resolve.cjs');
|
||||
|
||||
console.log('template path', templatePath);
|
||||
console.log('destination path', destinationPath);
|
||||
|
||||
fs.copyFileSync(
|
||||
templatePath,
|
||||
destinationPath
|
||||
);
|
||||
fs.copyFileSync(templatePath, destinationPath);
|
||||
Reference in New Issue
Block a user