Skip to content

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rohrig committed Mar 24, 2024
1 parent a859ae2 commit 9ccb06d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jurassicjs/monodeno",
"version": "0.0.9",
"version": "0.0.10",
"exports": "./mod.ts",
"description": "Run deno commands for a monorepo based on deno workspaces.",
"runtime": ["deno"],
Expand Down
9 changes: 6 additions & 3 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ if (existsSync(denoConfigPath)) {

// Continue using your denoConfig object
const workspaces = denoConfig.workspaces;

if (!workspaces?.length || workspaces.length === 0) {
console.error(chalk.bgRed("No workspaces found in deno.json"));
Deno.exit(1);
}

console.log('workspaces: ', workspaces);

// ... the rest of your logic ...


for (const workspace of workspaces) {
const chalkName = chalk.hex(colors[colorCounter]);
// Construct the path to the task script in the workspace
const taskScriptPath = `${workspace}/tasks/${command}.ts`;
console.log(chalkName('Running task in: ', taskScriptPath, '\n'));
console.log(chalkName('Running task in: ', workspace, '\n'));
// Start the server in a separate async function
const promise = (async () => {
const cmd = new Deno.Command(Deno.execPath(), {
Expand Down

0 comments on commit 9ccb06d

Please sign in to comment.