Skip to content

Speedup "npm install" step for npm-based formatters #1480

@simschla

Description

@simschla

From discussion in #1453

Npm-based formatters require an npm install call to prepare running the npm process for formatting.
It would be nice if we could speedup that part (or alltogether prevent it, if it is not needed).
Some ideas:

  1. Store the node_modules-directory and package.json somewhere in build-folder and copy/link those on later calls.
  2. Similar, but more longevity: Store these folders/files somewhere in $HOME/.cache/spotless/npm and reuse/copy/link them from there?
  3. Gradle-specific: Leverage gradle's build-cache by creating a gradle task that generates the package.json and node_modules dir as (cachable) output. A second/third run would then just receive these files/folders from the build cache?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions