mirror of
https://github.com/placeholder-soft/sui-data-sync.git
synced 2026-01-12 22:30:28 +08:00
25 lines
468 B
JavaScript
Executable File
25 lines
468 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const { createProjectGraphAsync } = require('@nx/devkit');
|
|
async function run() {
|
|
const graph = await createProjectGraphAsync();
|
|
|
|
const [, , name] = process.argv;
|
|
|
|
const project = graph.nodes[name];
|
|
if (project == null) {
|
|
throw new Error(`Project ${name} not found`);
|
|
} else {
|
|
console.log(project.data.root);
|
|
}
|
|
}
|
|
|
|
run()
|
|
.then(() => {
|
|
process.exit(0);
|
|
})
|
|
.catch(e => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|