code-corps / code-corps/code-corps-ember
Async load zxcvbn.js to use with ember-cli-password-strength
- Vorherrschende Sprache
- JavaScript
- Sterne
- 120
- Forks
- 75
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
# 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
Beitragsleitfaden
Rechercherichtung
Beginne mit ember-cli-build.js und dem vorhandenen Utility ember-stripe-elements addon/utils/load-script.js. Aktiviere das asynchrone Laden für ember-cli-password-strength und ermittle anschließend, wie das Projekt zxcvbn.js an einem vom Projekt kontrollierten Pfad statt unter der standardmäßigen Root-URL bereitstellen sollte. Als erledigt gilt die Aufgabe, wenn der asynchrone Modus aktiviert ist und die Bibliothek erfolgreich geladen wird, ohne sie zu bundlen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100