code-corps / code-corps/code-corps-ember
Async load zxcvbn.js to use with ember-cli-password-strength
- Lenguaje dominante
- JavaScript
- Estrellas
- 120
- Forks
- 75
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
# Problem
ember-cli-password-strength, since 2.0.0, has support for asynchronous loading of the `zxcvbn.js` library.
Since the library is 400k gzipped, it would make sense for us to make use of this.
However, the addon does not provide a framework to actually include the library as part of the project. Instead, it assumes, if aync mode is on, that the library is locaded at `${config.rootUrl}/zxcvbn.js`
We need to find a way to deal with this and switch to async mode.
## Subtasks
- [ ] Turn on async mode for the addon as per instructions, by modifying the app's `ember-cli-build.js` and adding
```Javascript
let app = new EmberAddon(defaults, {
'ember-cli-password-strength': {
bundleZxcvbn: false
}
});
```
- [ ] Provide the library, either at the expected path, or, more likely at our own path, by providing custom async loading facilities, similar to what we do with `ember-stripe-elements`
https://github.com/code-corps/ember-stripe-elements/blob/master/addon/utils/load-script.js
Guía de contribución
Línea de trabajo
Comienza con ember-cli-build.js y la utilidad existente ember-stripe-elements addon/utils/load-script.js. Habilita la carga asíncrona para ember-cli-password-strength y determina después cómo debería proporcionar el proyecto zxcvbn.js en una ruta controlada por el proyecto en lugar de la URL raíz predeterminada. Se considera completado cuando el modo asíncrono está habilitado y la biblioteca se carga correctamente sin incluirla en el bundle.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100