MacDownApp / MacDownApp/macdown
Migrate some script to modern JavaScript
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
@uranusjr has mentioned in that we may convert/rewrite some script with modern JavaScript (i.e. ES6+). We need transpiler (such as Bable) because according to [this post](https://stackoverflow.com/questions/42374413/how-do-i-set-the-webkit-version-used-by-a-webview), WebView in macOS 10.11 uses WebKit 601.7.8 (i.e. Safari 9, according to [Wikipedia](https://en.wikipedia.org/wiki/Safari_version_history)), which [supports virtually nothing in ES6](https://kangax.github.io/compat-table/es6/#safari9).
Simple Babel config should be OK:
```json
{
"presets": ["env"]
}
```
This would transform latest JavaScript to ES5, which (I assume) works well even in WebKit 536.30.1 in macOS 10.8.
Still I'm not sure whether it's necessary to migrate all JavaScript files. In addition, #952 may need modification or rework, such as renaming the folder to `asset-generator`.
Contributor guide
Research direction
Start by reviewing the discussion on PR #958 and the related #952 work, including the possible `asset-generator` folder rename. Determine which scripts should use Babel and verify that the selected output remains compatible with the WebKit versions mentioned in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100