code-corps / code-corps/code-corps-ember
Async load zxcvbn.js to use with ember-cli-password-strength
- Ngôn ngữ chính
- JavaScript
- Star
- 120
- Fork
- 75
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
# 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với ember-cli-build.js và utility hiện có ember-stripe-elements addon/utils/load-script.js. Bật việc tải không đồng bộ cho ember-cli-password-strength, sau đó xác định cách project nên cung cấp zxcvbn.js tại một đường dẫn do project kiểm soát thay vì URL root mặc định. Hoàn thành khi chế độ không đồng bộ được bật và thư viện tải thành công mà không được bundling.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100