- Update to ES modules syntax throughout the codebase - Add fileURLToPath and dirname imports to handle __dirname in ES modules - Upgrade Anthropic SDK from 0.10.0 to 0.39.0 - Fix JSON parsing to handle responses wrapped in Markdown code blocks - Improve documentation with clearer installation instructions - Add important notes about ES modules and SDK requirements - Update environment examples with API key format and model recommendations - Include index.js in package files list - Bump version to 1.0.2
27 lines
918 B
JavaScript
27 lines
918 B
JavaScript
/**
|
|
* Claude Task Master
|
|
* A task management system for AI-driven development with Claude
|
|
*/
|
|
|
|
// This file serves as the main entry point for the package
|
|
// The primary functionality is provided through the CLI commands
|
|
|
|
import { fileURLToPath } from 'url';
|
|
import { dirname, resolve } from 'path';
|
|
import { createRequire } from 'module';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
const require = createRequire(import.meta.url);
|
|
|
|
// Export the path to the dev.js script for programmatic usage
|
|
export const devScriptPath = resolve(__dirname, './scripts/dev.js');
|
|
|
|
// Export a function to initialize a new project programmatically
|
|
export const initProject = async (options = {}) => {
|
|
const init = await import('./scripts/init.js');
|
|
return init.initializeProject(options);
|
|
};
|
|
|
|
// Export version information
|
|
export const version = require('./package.json').version;
|