ember-cli / ember-cli/ember-cli-app-version

App version in Ember console debug statements

Abierto
#13 6 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
55
Forks
42
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Just started using this in our app, so thanks :smile:

Since the addon defines an initializer that registers the app as an ember library, I was surprised to see that it wasn't listed in the normal [library version debug output](https://github.com/emberjs/ember.js/blob/v1.11.0-beta.4/packages/ember-application/lib/system/application.js#L1106-L1126). After a little digging it appears that initializers run after [that method is called](https://github.com/emberjs/ember.js/blob/v1.11.0-beta.4/packages/ember-application/lib/system/application.js#L282), so the app version isn't in the list when it's printed. Not a big deal, but I've definitely found it handy to find the version in the console without opening the ember inspector and clicking the info tab (I used to call `Ember.libraries.register` in `app/app.js` directly).

I would have opened a PR, but I can't figure out how to use addon hooks to run code before `Ember.Application#init` is called. The only thing I could think of was to add an inline script using the `contentFor` hook, but that ends up violating CSP. Do you have any idea how to do this?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con las secciones enlazadas de Ember application.js que muestran la salida de depuración de la biblioteca y el orden de llamadas de Application#init. Lee el comportamiento del inicializador del addon y del hook contentFor, junto con el enfoque de registro existente en app/app.js. Estará terminado cuando la versión de la app aparezca en la salida normal de la biblioteca en la consola sin infringir CSP.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
developer-experience
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.