Skip to content

gulp-cached and gulp-typescript compatibility #25

Description

@mporam

Not sure if this is the right place to log this or not. Sorry if it is not.

Currently gulp-cached and gulp-typescript cannot work together if you are using global variables or functions. While obviously that is not ideal in a JS project, it is the reality of many legacy applications.

I am currently converting a JS proj to TS. It has ~35 JS files which are included into their respective html files as needed. I have converted each js file into .ts and have it compiling them into .js using gulp-typescript. However the watcher takes ~11s to run due to the size and amount of files. gulp-cached is the ideal fix for this. However.

When gulp-cached filters out the unchanged files from the file list and passes the changed files onto gulp-typescript, gulp-typescript then errors because the global functions/variables don't exist within the set of files currently being compiled.

There needs to be a way that gulp-typescript can access the cache of files to ensure the currently being compiled files dont error when combined with the cached files (excluding the file being compiled).

Hope this makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions