code-corps / code-corps/code-corps-ember

Async load zxcvbn.js to use with ember-cli-password-strength

オープン
#1,662 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Difficulty: Medium Skill: JavaScript Time: 2 hours
主要言語
JavaScript
スター
120
フォーク
75
PR マージ指標
30日以内にマージされた PR はありません

説明

# 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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。