tessl install tessl/npm-lerna--init@6.6.0Create a new Lerna repo or upgrade an existing repo to the current version of Lerna
Agent Success
Agent success rate when using this tile
75%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.36x
Baseline
Agent success rate without this tile
55%
Build a watch-based development system for a monorepo that automatically rebuilds packages when source files change.
Your task is to create a small monorepo with multiple packages and set up a watch system that automatically triggers builds when files change. The system should leverage the monorepo tool's file watching capabilities to provide real-time feedback during development.
Create a monorepo with the following packages:
core package should export a simple function:
// packages/core/src/index.js
export function greet(name) {
return `Hello, ${name}!`;
}ui package should use the core package:
// packages/ui/src/index.js
import { greet } from '@myapp/core';
export function renderGreeting(name) {
return `<div>${greet(name)}</div>`;
}Each package should have a build script in its package.json that:
dist directory.built extensionExample build script:
{
"scripts": {
"build": "mkdir -p dist && cp src/index.js dist/index.built.js"
}
}Set up a watch system that:
src/**/*.js files within packagesThe watch command should be configured in the root package.json under a watch script.
packages/core/src/index.js is modified, the watch system detects the change and triggers the build script, creating packages/core/dist/index.built.js @testpackages/core/dist/index.built.js and packages/ui/dist/index.built.js @test@generates
When running the watch command and modifying files:
Provides monorepo management and file watching capabilities.
@satisfied-by