Skip to content

Including and excluding packaged files #19

@TimeTravelPenguin

Description

@TimeTravelPenguin

I have been testing the scripts in this repo and noticed that it isn't ignoring entries listed within my .gitignore. Is it possible to exclude everything listed by git status --ignored?

While .typstignore is fine for specifying what is and isn't packageable source material, relisting everything from the .gitignore isn't feasible. In my case, I am using a generated .gitignore, so I am not sure which patterns are a minimal subset that would need to be included in .typstignore.

I have been thinking about the problem of packaging recently, and I have found that this kind of automated process is rather difficult to do nicely for everyone's use case.

The script package @preview takes 26 seconds on my machine (due to node_modules). I was thinking about whether it is possible/better to use .gitignore to optimise the enumerate function within the script, or if instead there could be a custom section within the typst.toml to configure what to include or exclude for a packaging script or utility.

I want to write my own tool to do this, which I might start soon, but for the moment, I wanted to start some discussion to gain additional input, and also suggest whether or not the exclusion of .gitignore entries is doable for the time being.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions