Skip to content

Support Running Without Triggering npm pack | postbuild support #253

@holblin

Description

@holblin

Description:

It would be helpful to allow the tool to run directly on the current folder without automatically triggering npm pack.

Use Case:

I want to use this tool as part of a postbuild script. However, the current behavior causes an infinite loop:

  • npm postbuild triggers attw
  • attw triggers npm pack
  • npm pack triggers npm build
  • npm build triggers npm postbuild
  • ...and the cycle repeats

Current Workaround:

To avoid this loop, I manually create a tarball and run attw on it:

"postbuild": "tar -czf dist/archive.tgz LICENSE README.md dist/cjs dist/esm dist/umd docs package.json && npx attw --format ascii dist/archive.tgz && rm dist/archive.tgz"

Proposed Solution:

Introduce an option or flag to allow attw to operate directly on the current directory without invoking npm pack.

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