arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io
Support Running Without Triggering npm pack | postbuild support
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.6k
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
# 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`.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza localizando la ruta de la CLI attw que invoca npm pack y revisa cómo se analizan las opciones de línea de comandos. El cambio estará completo cuando attw pueda analizar el directorio actual sin invocar npm pack, de modo que pueda ejecutarse desde un script postbuild sin activar el bucle de compilación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- node.js, typescript
- Área
- build-system, cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100