Documentation
    Preparing search index...

    Interface TurbowatchLocalNodeModulesOptions

    interface TurbowatchLocalNodeModulesOptions {
        buildDependenciesScript?: string;
        cwd?: string;
        deep?: boolean;
        devScript?: string;
        logChangedFiles?: boolean;
        onFirstBuild?: () => undefined | ChildProcess;
        packageManagerCommand?: string;
        useGitIgnore?: boolean;
    }

    Hierarchy

    • CwdOption
      • TurbowatchLocalNodeModulesOptions
    Index

    Properties

    buildDependenciesScript?: string

    The command used to build the dependencies of this package.

    'build:dependencies'
    
    cwd?: string

    Current working directory

    process.cwd()
    
    deep?: boolean

    If true, it will make sure ignore statements do not contain node_modules so the watcher can watch the entire dependency tree.

    If false deeper node_modules will be ignored.

    true
    
    devScript?: string

    What package.json script should be started once buildDependenciesScript is first finished. By default it's dev_ with an underscore at the end as this turbowatch call should be named dev

    'dev_'
    
    logChangedFiles?: boolean

    Log out changed files on every change. Useful for debugging if you notice builds are getting triggered over and over again.

    false
    
    onFirstBuild?: () => undefined | ChildProcess

    Called the first time buildDependenciesScript finished You can use this to start your app if the way devScript doesn't suffice. If this is defined, devScript will not be used!

    It can be async but it won't be awaited!

    packageManagerCommand?: string

    Which package manager to invoke when running buildDependenciesScript

    'pnpm'
    
    useGitIgnore?: boolean

    If the default ignored files like

    • 'dist'
    • '.turbo'
    • '.vercel'
    • '.cache'
    • 'coverage'
    • 'build'

    Does not suffice, you can enable this and then it will read all the .gitignore files up your project root and include those too in the do not watch list. This could potentially ignore more than you actually want though!

    false