-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: v7 codebase well some changes to tools (#674)
- Loading branch information
1 parent
783e1dc
commit 9d1637b
Showing
219 changed files
with
6,656 additions
and
15,501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import path from 'node:path'; | ||
import { spawn } from 'node:child_process'; | ||
|
||
/** | ||
* Run given path for the given library | ||
* @param {object} options - The options object | ||
* @param {string} options.library - The library to test | ||
* @param {string} options.path - The path to the file that needs to be run | ||
* @returns {Promise<void>} | ||
*/ | ||
const run = async ({ library, file: filePath }) => { | ||
console.log(`Running ${filePath} from ${library}`); | ||
|
||
// Resolve paths in a cross-platform way | ||
const mainFolder = path.join(process.cwd(), 'lib', library); | ||
|
||
const spwn = spawn( | ||
`node ${filePath}`, | ||
[], | ||
{ | ||
stdio: 'inherit', | ||
// Set cwd to the project root | ||
cwd: mainFolder, | ||
shell: true, | ||
}, | ||
); | ||
|
||
spwn.on('exit', (code) => { | ||
if (code !== 0) { | ||
console.error(`Failed to run ${filePath} from ${library}`); | ||
process.exit(1); | ||
} | ||
}); | ||
|
||
spwn.on('error', (error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); | ||
|
||
spwn.on('close', () => { | ||
console.log(`finished running ${filePath} from ${library}`); | ||
}); | ||
}; | ||
|
||
export default run; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
dist | ||
coverage | ||
index.mjs | ||
index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# @aoijs/aoi.js | ||
# @akarui/aoi.js | ||
|
||
dev version for Aoi.js | ||
A Extension for Aoi.js |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.