mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
init: the first public commit for AFFiNE
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"executors": {
|
||||
"tsCheck": {
|
||||
"implementation": "./tsCheck.js",
|
||||
"schema": "./schema.json",
|
||||
"description": "Runs `tsCheck`."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"executors": "./executor.json"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"type": "object",
|
||||
"cli": "nx",
|
||||
"properties": {
|
||||
"tsCheck": {
|
||||
"type": "string",
|
||||
"description": "Typescript check"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
const {
|
||||
detectPackageManager,
|
||||
} = require('@nrwl/tao/src/shared/package-manager');
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
exports['default'] = async function tscExecutor(_, context) {
|
||||
const libRoot = context.workspace.projects[context.projectName].root;
|
||||
|
||||
const executionCode = await new Promise(resolve => {
|
||||
const child = spawn('pnpm', ['exec', 'tsc', '-b', libRoot], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
child.on('data', args => console.log(args));
|
||||
child.on('close', code => resolve(code));
|
||||
});
|
||||
|
||||
return { success: executionCode === 0 };
|
||||
};
|
||||
Reference in New Issue
Block a user