docs: update import example for v10 named export - #610
Conversation
|
Preferring #611 over this. |
|
Thanks for picking this up — the named export is the right call. Two things the example may still trip on, both because v10 is pure ESM ( 1. cwd: path.resolve(__dirname, 'scripts/watchers'),
2.
Verified against published
If it's useful, the fully-ESM version: import path from 'node:path';
import { concurrently } from 'concurrently';
const { result } = concurrently(
[
'npm:watch-*',
{ command: 'nodemon', name: 'server' },
{ command: 'deploy', name: 'deploy', env: { PUBLIC_KEY: '...' } },
{
command: 'watch',
name: 'watch',
cwd: path.resolve(import.meta.dirname, 'scripts/watchers'),
},
],
{
prefix: 'name',
killOthersOn: ['failure', 'success'],
restartTries: 3,
cwd: path.resolve(import.meta.dirname, 'scripts'),
},
);
result.then(success, failure);Happy either way — entirely your call whether the |
Fixes #606. v10 changed the export from default to named. Updated the programmatic API example to use
const { concurrently } = require("concurrently").