browserify / browserify/static-module
Some way of combining multiple transforms using static-module
- Lenguaje dominante
- JavaScript
- Estrellas
- 75
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
This is gonna be the most half-formed feature request I've ever posted on GitHub. Sorry!
**The problem to solve:** Since `static-module` works by parsing into an AST, transforming, and code-generating, it has a pretty significant overhead associated with it. For example: I have a script build using Browserify which takes about 8 seconds, where <2 seconds are spent compiling (TypeScript) and the remaining >6 seconds are spent in various transforms using `static-module` (`brfs` and `varlessify` (I wrote the latter)). I want to add another `static-module`-based transform, but I hesitate to add another 3 seconds to my incremental build time!
**Imagine a world** where multiple transforms using `static-module` could be combined into a single transform, thus significantly decreasing the performance impact. The source would only have to get parsed into an AST once! This would open the door to scalable use of tons of compile-time transformations. I'm not sure what the API for this would look like, but I have an inkling that it could _possibly_ be done entirely within `static-module` without requiring any changes to downstream modules like `brfs`, perhaps by returning an extra property on the result of `staticModule()`.
``` js
// a bunch of different transforms, more realistically pulled in separately from different modules
var brfs = staticModule({ { fs: ... }, ... });
var brfoo = staticModule({ { foo: ... }, ...});
var brbar = staticModule({ { bar: ... }, ...});
// combine them all
var massiveTransform = staticModule.combine(brfs, brfoo, brbar);
```
Thoughts?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza revisando la API de transformación actual de static-module y los transforms relacionados de Browserify mencionados en el issue, incluidos brfs y varlessify. Define una API de composición concreta que analice y genere cada fuente una sola vez, y luego establece comprobaciones de rendimiento y compatibilidad que demuestren que los transforms combinados funcionan sin requerir cambios posteriores.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100